Use class extension to avoid type conversion
This commit is contained in:
parent
754c4654d4
commit
d3bf400d56
1 changed files with 5 additions and 1 deletions
|
@ -10,6 +10,10 @@
|
||||||
#include "content/public/browser/native_web_keyboard_event.h"
|
#include "content/public/browser/native_web_keyboard_event.h"
|
||||||
#include "ui/events/keycodes/keyboard_codes.h"
|
#include "ui/events/keycodes/keyboard_codes.h"
|
||||||
|
|
||||||
|
@interface NSWindow (EventDispatchingWindow)
|
||||||
|
- (void)redispatchKeyEvent:(NSEvent*)event;
|
||||||
|
@end
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
void CommonWebContentsDelegate::HandleKeyboardEvent(
|
void CommonWebContentsDelegate::HandleKeyboardEvent(
|
||||||
|
@ -24,7 +28,7 @@ void CommonWebContentsDelegate::HandleKeyboardEvent(
|
||||||
ExitFullscreenModeForTab(source);
|
ExitFullscreenModeForTab(source);
|
||||||
|
|
||||||
if (event.os_event.window)
|
if (event.os_event.window)
|
||||||
[(EventDispatchingWindow*)event.os_event.window redispatchKeyEvent:event.os_event];
|
[event.os_event.window redispatchKeyEvent:event.os_event];
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace atom
|
} // namespace atom
|
||||||
|
|
Loading…
Reference in a new issue