mirror of
https://github.com/electron/electron.git
synced 2026-02-16 18:16:39 -05:00
Use isKindOfClass
This commit is contained in:
@@ -23,8 +23,9 @@ void CommonWebContentsDelegate::HandleKeyboardEvent(
|
||||
if (event.windowsKeyCode == ui::VKEY_ESCAPE && is_html_fullscreen())
|
||||
ExitFullscreenModeForTab(source);
|
||||
|
||||
if (event.os_event.window) {
|
||||
AtomNSWindow* native_window = static_cast<AtomNSWindow*>(event.os_event.window);
|
||||
NSWindow* window = event.os_event.window;
|
||||
if (window && [window isKindOfClass:[AtomNSWindow class]]) {
|
||||
AtomNSWindow* native_window = static_cast<AtomNSWindow*>(window);
|
||||
[native_window redispatchKeyEvent:event.os_event];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user