premake/README-cygwin.txt
author Sam Lantinga <slouken@libsdl.org>
Sun, 17 Aug 2014 14:57:52 -0700
changeset 9086 c5e33f9a0d03
parent 7925 f090a47eb7f7
permissions -rwxr-xr-x
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.
icculus@7925
     1
There is a script in the Cygwin/build-scripts folder for generating a series of
icculus@7925
     2
GNU makefiles for building the SDL2 project and some parts of its test suite.
icculus@7925
     3
These work similarly to the MinGW makefiles, but the overall Cygwin project has
icculus@7925
     4
significant limitations.
icculus@7925
     5
icculus@7925
     6
The current project will not build correctly. It's experimental and has a lot of
icculus@7925
     7
tweaking needed to be built. It was built successfully once, but it has not been
icculus@7925
     8
maintained in any way.
icculus@7925
     9
icculus@7925
    10
The Cygwin project is limited in that it is not expected to be able to run
icculus@7925
    11
anything visual at all. It is not difficult to enable all of the visual tests
icculus@7925
    12
and support (such as X11 support or OpenGL), but it is not a goal for this
icculus@7925
    13
project. For the complexity of having a compatible desktop environment setup on
icculus@7925
    14
Cygwin, it's assumed that will not be the case for most users of the generated
icculus@7925
    15
Cygwin project. As a result, only the core tests and library are built for
icculus@7925
    16
Cygwin, focusing on things like thread support, file operations, and various
icculus@7925
    17
system queries and information gathering.
icculus@7925
    18
icculus@7925
    19
The Cygwin directory does have automated tests to run through the tests
icculus@7925
    20
supported by Cygwin. It also has separate build scripts for both debug and
icculus@7925
    21
release builds, though this is assuming the GNU make utility is located in the
icculus@7925
    22
user's PATH.
icculus@7925
    23
icculus@7925
    24
The Cygwin project has no outstanding dependencies, since it is designed to be
icculus@7925
    25
mostly minimalistic and just relied on the POSIX functionality provided by
icculus@7925
    26
Cygwin.
icculus@7925
    27
icculus@7925
    28
Like the other projects, you may cleanup the entire directory of any generated
icculus@7925
    29
or built files using the clean script located in Cygwin/build-scripts.