File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -1862,6 +1862,19 @@ - (void)mouseMoved:(NSEvent *)theEvent
18621862 x = point.x ;
18631863 y = (window->h - point.y );
18641864
1865+ // On macOS 26 if you move away from a space and then back, mouse motion events will have incorrect
1866+ // values at the top of the screen. The global mouse position query is still correct, so we'll fall
1867+ // back to that until this is fixed by Apple. Mouse button events are interestingly not affected.
1868+ if (@available (macOS 26.0 , *)) {
1869+ if ([_data.listener isInFullscreenSpace ]) {
1870+ int posx = 0 , posy = 0 ;
1871+ SDL_GetWindowPosition (window, &posx, &posy);
1872+ SDL_GetGlobalMouseState (&x, &y);
1873+ x -= posx;
1874+ y -= posy;
1875+ }
1876+ }
1877+
18651878 if (NSAppKitVersionNumber >= NSAppKitVersionNumber10_13_2 ) {
18661879 // Mouse grab is taken care of by the confinement rect
18671880 } else {
You can’t perform that action at this time.
0 commit comments