Sam Lantinga
bcf5472d16
Fixed bug 2073 - Mac: window moves unexpectedly when exiting SDL_WINDOW_FULLSCREEN_DESKTOP mode
...
Alex Szpakowski
In Mac OS X, when SDL_SetWindowFullscreen(window, 0) is called on a window which was in SDL_WINDOW_FULLSCREEN_DESKTOP mode, its original size is restored but its position is moved to the bottom of the screen.
I tracked down the issue to these two lines: http://hg.libsdl.org/SDL/file/fdd5cc9e9f90/src/video/cocoa/SDL_cocoawindow.m#l1034
I believe [nswindow setFrameOrigin:rect.origin] implicitly calls [nswindow constrainFrameRect:rect toScreen:screen], which will attempt to constrain the window to the screen, but at that point the window size is still full-screen rather than the restored window size, so the constrainFrameRect function operates on the wrong window size.
https://developer.apple.com/library/mac/documentation/cocoa/reference/applicationkit/classes/NSWindow_Class/Reference/Reference.html#//apple_ref/occ/instm/NSWindow/constrainFrameRect:toScreen :
I resolved the issue by swapping the order of the function calls, like so:
[nswindow setContentSize:rect.size];
[nswindow setFrameOrigin:rect.origin];
2013-10-21 02:37:03 -07:00
Sam Lantinga
69a4351eb0
Fixed bug 2121 - GCC throws error on SDL_FORCE_INLINE when compiling with -ansi
2013-09-30 22:35:32 -07:00
Edward Rudd
869a707612
add in High DPI support (aka Retina)
...
- based on J?rgen's patch with a few bug fixes
2013-09-20 13:43:00 -04:00
Sam Lantinga
67c02a282a
Mac: Translate Ctrl-Left click to right click.
2013-09-13 17:42:31 -07:00
J?rgen P. Tjern?
14bf230d76
Mac: Fix restoring of Cmd-H-hidden fullscreen desktop windows.
...
This should fix http://bugzilla.libsdl.org/show_bug.cgi?id=1996
2013-08-12 11:09:13 -07:00
Gabriel Jacobo
dad420670f
Fixes #2022 , do not resume on Android when surfaceChanged
...
If the app is in landscape mode and the user presses the power button, a pause
is followed immediately by a surfaceChanged event because the lock screen
is shown in portrait mode. This triggers a "false" resume.
So, we just pause and resume following the onWindowFocusChanged events.
Also, wait for SDL_APP_WILLENTERBACKGROUND and SDL_APP_DIDENTERBACKGROUND before
blocking the event pump.
2013-08-12 11:13:50 -03:00