Skip to content

Commit 4647c3c

Browse files
徐扬斌coremail-cyt
authored andcommitted
MacOSX: Make wxWebviewWebkit capture hotkeys less eagerly.
On MacOSX, the wxWebviewWebkit will eagerly capture the hotkeys despite the fact that it might be the one in focus. This will interfere other widgets' functions. It should only handle the hotkeys when it is the firstResponder. More about firstResponder: https://developer.apple.com/documentation/appkit/nswindow/1419440-firstresponder
1 parent a92922d commit 4647c3c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/osx/webview_webkit.mm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,10 @@ -(id)validRequestorForSendType:(NSString*)sendType returnType:(NSString*)returnT
618618

619619
- (BOOL)performKeyEquivalent:(NSEvent *)event
620620
{
621+
if (self.window.firstResponder != self)
622+
{
623+
return NO;
624+
}
621625
if ([event modifierFlags] & NSCommandKeyMask)
622626
{
623627
switch ([event.characters characterAtIndex:0])

0 commit comments

Comments
 (0)