diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/macos.m | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/macos.m b/src/macos.m index ad236784..191842f6 100644 --- a/src/macos.m +++ b/src/macos.m | |||
@@ -436,6 +436,10 @@ static iBool processScrollWheelEvent_(NSEvent *event) { | |||
436 | const iBool isInertia = (event.momentumPhase & (NSEventPhaseBegan | NSEventPhaseChanged)) != 0; | 436 | const iBool isInertia = (event.momentumPhase & (NSEventPhaseBegan | NSEventPhaseChanged)) != 0; |
437 | const iBool isEnded = event.scrollingDeltaX == 0.0f && event.scrollingDeltaY == 0.0f && !isInertia; | 437 | const iBool isEnded = event.scrollingDeltaX == 0.0f && event.scrollingDeltaY == 0.0f && !isInertia; |
438 | const iWindow *win = &get_MainWindow()->base; | 438 | const iWindow *win = &get_MainWindow()->base; |
439 | if (event.window != nsWindow_(win->win)) { | ||
440 | /* Not the main window. */ | ||
441 | return iFalse; | ||
442 | } | ||
439 | if (isPerPixel) { | 443 | if (isPerPixel) { |
440 | /* On macOS 12.1, stopping ongoing inertia scroll with a tap seems to sometimes produce | 444 | /* On macOS 12.1, stopping ongoing inertia scroll with a tap seems to sometimes produce |
441 | spurious large scroll events. */ | 445 | spurious large scroll events. */ |
@@ -525,7 +529,6 @@ static iBool processScrollWheelEvent_(NSEvent *event) { | |||
525 | ev.wheel.y = iSign(ev.wheel.y); | 529 | ev.wheel.y = iSign(ev.wheel.y); |
526 | } | 530 | } |
527 | #endif | 531 | #endif |
528 | |||
529 | return iTrue; | 532 | return iTrue; |
530 | } | 533 | } |
531 | 534 | ||