Use isKindOfClass

This commit is contained in:
Kevin Sawicki 2016-06-16 09:26:32 -07:00
parent b80f20912f
commit 02abda4be8

View file

@ -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];
}
}