Add correct window check for wheel events. See description
Tested that with two windows, events are fired on the correct BrowserWindow instance and not both, and that scrolling a window which is in the background works properly.
This commit is contained in:
parent
e96e674201
commit
d186dceb4b
1 changed files with 1 additions and 1 deletions
|
@ -494,7 +494,7 @@ NativeWindowMac::NativeWindowMac(
|
|||
event_monitor_.reset([[NSEvent
|
||||
addLocalMonitorForEventsMatchingMask:NSScrollWheelMask
|
||||
handler:^NSEvent * _Nullable(NSEvent * event) {
|
||||
if (![window_ isKeyWindow])
|
||||
if ([[event window] windowNumber] != [window_ windowNumber])
|
||||
return event;
|
||||
|
||||
if (!web_contents)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue