premake/README-macosx.txt
author Sam Lantinga <slouken@libsdl.org>
Sun, 17 Aug 2014 14:57:52 -0700
changeset 9086 c5e33f9a0d03
parent 7925 f090a47eb7f7
child 9112 345a7d41dda9
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
Use the Xcode command files (located in the Xcode/build-scripts folder)
icculus@7925
     2
to conveniently generate a workspace for Xcode 3 or Xcode 4. It also
icculus@7925
     3
contains a cleaner script and a convenient script for automatically
icculus@7925
     4
running all the test suites.
icculus@7925
     5
icculus@7925
     6
If you use the script to automatically build the workspace file, you
icculus@7925
     7
need to open the workspace at least once after generating it, or it
icculus@7925
     8
will give errors that certain schema do not exist within the workspace.
icculus@7925
     9
Also, the script depends on Xcode command line tools being installed.
icculus@7925
    10
icculus@7925
    11
There are separate build files for building for i386 architecture
icculus@7925
    12
versus x86_64 architecture. There are separate build scripts for
icculus@7925
    13
Xcode 3 versus Xcode 4, but these just use the different toolchains.
icculus@7925
    14
icculus@7925
    15
There is a script for automatically running through all known supported
icculus@7925
    16
tests on that platform.
icculus@7925
    17
icculus@7925
    18
The Mac OS X projects currently have reliance on the following dependencies:
icculus@7925
    19
icculus@7925
    20
  -AudioToolbox.framework
icculus@7925
    21
  -AudioUnit.framework
icculus@7925
    22
  -Cocoa.framework
icculus@7925
    23
  -CoreAudio.framework
icculus@7925
    24
  -IOKit.framework
icculus@7925
    25
  -Carbon.framework
icculus@7925
    26
  -ForceFeedback.framework
icculus@7925
    27
  -CoreFoundation.framework
icculus@7925
    28
icculus@7925
    29
It will also link to OpenGL.framework, as the dependency function for OpenGL
icculus@7925
    30
assumes that OpenGL always exists on Mac OS X. However, this is defined in
icculus@7925
    31
a segmented way to allow the possibility of no OpenGL support on Mac OS X.
icculus@7925
    32
icculus@7925
    33
Run the clean script to clear out the directory of Xcode-related files
icculus@7925
    34
and binaries.