README.txt
author Sam Lantinga <slouken@libsdl.org>
Sun, 17 Aug 2014 14:57:52 -0700
changeset 9086 c5e33f9a0d03
parent 9025 d09d4b578e77
child 9507 b1e690e9c5b3
permissions -rw-r--r--
Fixed bug 2655 - OSX: Window position and global mouse coord spaces are different

Tim McDaniel

On OSX, with revision 8729, the coordinate space for window position and the coordinate space for global mouse position don't match. For a non-fullscreen window, the window position is global relative to the bottom of the menubar. The global mouse position is relative to the top of the screen. This affects Cocoa_WarpMouse and potentially other things as well. Further, the coordinate system for window position is now affected by what screen it is on. For example, if I have two equal size screens oriented side by side such that the tops of the screens are equal in global space, with the menubar on one screen, and a window straddles the two screens, the window's y position makes no sense. The window's y position depends on what screen "most" of the window is on. So if I move the window horizontally just a bit, the y position of my window is now different by the size of the menubar, even though the window was not moved vertically.

I'd like to reiterate that this was a fairly fundamental change (and a breaking change for us). If SDL OSX is to really support multi-display configurations, this is especially problematic.

If the real concern is preventing windows from going under the menubar, then perhaps a solution involving something like overriding [NSWindow constrainFrameRect] would be less problematic than redefining the global window coord space for the main display.
slouken@9025
     1
slouken@9025
     2
                         Simple DirectMedia Layer
slouken@9025
     3
slouken@9025
     4
                                  (SDL)
slouken@9025
     5
slouken@9025
     6
                                Version 2.0
slouken@9025
     7
slouken@9025
     8
---
slouken@9025
     9
http://www.libsdl.org/
slouken@9025
    10
slouken@9025
    11
Simple DirectMedia Layer is a cross-platform development library designed
slouken@9025
    12
to provide low level access to audio, keyboard, mouse, joystick, and graphics
slouken@9025
    13
hardware via OpenGL and Direct3D. It is used by video playback software,
slouken@9025
    14
emulators, and popular games including Valve's award winning catalog
slouken@9025
    15
and many Humble Bundle games.
slouken@9025
    16
slouken@9025
    17
More extensive documentation is available in the docs directory, starting
slouken@9025
    18
with README.md
slouken@9025
    19
slouken@9025
    20
Enjoy!
slouken@9025
    21
	Sam Lantinga				(slouken@libsdl.org)