mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user