Lagrange [dev]

macOS: Let other windows handle scroll events

=> 829733272b2a2fe6108c9834215bd07520b69033

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) {
     const iBool isInertia  = (event.momentumPhase & (NSEventPhaseBegan | NSEventPhaseChanged)) != 0;
     const iBool isEnded    = event.scrollingDeltaX == 0.0f && event.scrollingDeltaY == 0.0f && !isInertia;
     const iWindow *win     = &get_MainWindow()->base;
+    if (event.window != nsWindow_(win->win)) {
+        /* Not the main window. */
+        return iFalse;
+    }
     if (isPerPixel) {
         /* On macOS 12.1, stopping ongoing inertia scroll with a tap seems to sometimes produce
            spurious large scroll events. */
@@ -525,7 +529,6 @@ static iBool processScrollWheelEvent_(NSEvent *event) {
             ev.wheel.y = iSign(ev.wheel.y);
         }
 #endif
-    
     return iTrue;        
 }
 
Proxy Information
Original URL
gemini://git.skyjake.fi/lagrange/dev/cdiff/829733272b2a2fe6108c9834215bd07520b69033
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
29.05395 milliseconds
Gemini-to-HTML Time
0.205136 milliseconds

This content has been proxied by September (ba2dc).