Alex Szpakowski
fd85f5748d
Mac: back out commit 3e9b2ae41adf. It causes significant overhead on many GPUs.
2016-12-23 22:49:37 -04:00
Alex Szpakowski
d719374cb9
Mac: Fix over-saturated colors on P3 displays (e.g. the 2016 MBPs).
2016-12-23 22:08:18 -04:00
Sam Lantinga
354a8f276e
SDL for Mac - only enable global event tap when actually necessary (app has focus and has requested relative mouse mode or has asked for a mouse grab). in other situations the event tap impacts system performance and battery life with no benefit.
2016-11-26 10:26:22 -08:00
Sam Lantinga
27d4f09929
Implemented SDL_GetHintBoolean() to make it easier to check boolean hints
2016-10-07 23:40:44 -07:00
Ryan C. Gordon
4f4c4b629f
Added SDL_SetWindowResizable(). (thanks, Ethan!)
2016-09-29 22:52:41 -04:00
Sam Lantinga
a13da2faa7
Generalized the hint for whether the application gets a mouse event when clicking on the window to activate it, and is now named SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH.
...
The behavior is defined to not receive the click event, and this hint allows you to override that.
2016-09-29 13:34:49 -07:00
Alex Szpakowski
450fa8cdf9
Use OS-provided click counts on macOS and iOS for mouse press and release events.
2016-09-24 18:46:34 -03:00
Sam Lantinga
29214826ec
Fixed warning with Xcode 7.3.0
2016-09-16 22:27:58 -07:00
Alex Szpakowski
86708c3cd8
Enable more compiler warnings in the Xcode projects (based on Xcode 8's suggestion), made some integer downcasts explicit.
2016-09-13 19:51:10 -03:00
Ryan C. Gordon
5bcf1d256b
cocoa: Fixed incorrect autorelease, noted by static analysis.
2016-08-28 19:06:31 -04:00
Alex Szpakowski
4a468739f8
Removed Mac OS 10.5 support (bug #3137 ). Also fixed a warning about deprecated Carbon code when using SDL_audio (bug #3127 , thanks Dominik!)
2016-05-21 00:20:52 -03:00
Alex Szpakowski
b15efce277
Cocoa mouse code: Replaced NSPointInRect with NSMouseInRect (thanks Eric Wasylishen!) Fixes bug #3312 .
2016-05-01 21:41:30 -03:00
Alex Szpakowski
d383502657
Mac: replaced a deprecated CGSetLocalEventsSuppressionInterval call that I missed in commit 2f72bdfee9bb
2016-05-01 19:51:10 -03:00
Alex Szpakowski
88372277b7
Add a new hint SDL_HINT_MAC_MOUSE_FOCUS_CLICKTHROUGH, which allows mouse click events to occur when clicking to focus a window in Mac OS X.
...
Fixes bug #3300 .
2016-04-02 11:54:05 -03:00
Ryan C. Gordon
aa4952fdef
Added SDL_WINDOWEVENT_HIT_TEST.
...
This lets windows know when they are dropping a mouse event because their
hit test reported something other than SDL_HITTEST_NORMAL. It lets them know
exactly where in the event queue this happened.
This patch is based on work in Unreal Engine 4's fork of SDL,
compliments of Epic Games.
2015-04-21 10:10:59 -04:00
Ryan C. Gordon
3bdaf4c611
Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
...
This is currently implemented for X11, Cocoa, Windows, and DirectFB.
This patch is based on work in Unreal Engine 4's fork of SDL,
compliments of Epic Games.
2016-01-05 02:46:10 -05:00
Ryan C. Gordon
8e855f2fbc
Added SDL_DROPBEGIN and SDL_DROPCOMPLETE events, plus window IDs for drops.
...
This allows an app to know when a set of drops are coming in a grouping of
some sort (for example, a user selected multiple files and dropped them all
on the window with a single drag), and when that set is complete.
This also adds a window ID to the drop events, so the app can determine to
which window a given drop was delivered. For application-level drops (for
example, you launched an app by dropping a file on its icon), the window ID
will be zero.
2016-01-05 01:42:00 -05:00
Ryan C. Gordon
e0e04542d0
Added a few FIXMEs.
2015-04-21 09:46:48 -04:00
Sam Lantinga
42065e785d
Updated copyright to 2016
2016-01-02 10:10:34 -08:00
Ryan C. Gordon
326b357804
Mac: don't ignore mouse clicks on the top pixel of a window (thanks, Joshua!).
...
Fixes Bugzilla #3190 .
2015-12-29 01:09:58 -05:00
Ryan C. Gordon
257b7af247
Sync up the caps/numlock state properly without sending key events.
...
Partially fixes Bugzilla #2736 and #3125 .
2015-12-28 13:07:44 -05:00
Ryan C. Gordon
d3b323f89d
Mac: Fix keyboard state if capslock was toggled while app wasn't in foreground.
2015-12-27 23:39:43 -05:00
Alex Szpakowski
6a50d33385
Removed some debug prints.
2015-11-30 03:30:35 -04:00
Alex Szpakowski
9ddc6c3441
Mac: Fixed SDL_SetWindowFullscreen not restoring the window's original size when exiting a Space.
2015-11-30 03:30:07 -04:00
Sam Lantinga
5103ae9fd6
one last SDL fix: restore menu bar if we destroy a fullscreen window without transitioning it back to a non-fullscreen window first
2015-11-09 08:55:07 -08:00
Sam Lantinga
eeddb7c534
more SDL fullscreen state tracking fixes, don't update fullscreen flags on failure to change fullscreen state
2015-11-09 08:54:56 -08:00
Sam Lantinga
792354d6f0
SDL OSX implementation must account for the fact that going fullscreen can fail. improve the logic around retrying, make a few attempts before failing.
2015-11-09 08:54:49 -08:00
Sam Lantinga
2d884656c4
add hacky support for failed fullscreen transitions. SDL doesn't have the concept of a fullscreen transition that failed. if the user is actively changing spaces while the app goes fullscreen, it fails to go fullscreen; now it will just try again instead of hanging around with the wrong window styles.
2015-11-09 08:54:42 -08:00
Alex Szpakowski
f8824cb99b
Mac: Fix returning to the window's Space in OS X 10.11+ when SDL_WINDOW_FULLSCREEN_DESKTOP is used (bug #3152.)
2015-10-23 03:37:53 -03:00
Alex Szpakowski
6a32ca7a39
Mac: Fixed SDL_SetWindowSize to set the size of the content area of the window, rather than the total size including decorations.
2015-09-09 13:55:11 -03:00
Ryan C. Gordon
9e2b90e2a4
Cocoa: Keep the window's screen position through SDL_SetWindowSize().
...
The Y coordinate is flipped in Cocoa, so if you change the height, the window
will move and maybe clip against the screen edge if you don't adjust its Y
coordinate to match.
Possibly fixes Bugzilla #3066 .
2015-08-14 01:20:41 -04:00
Sam Lantinga
396b3b8992
Better fix for bug 3048, don't crash if the window title is NULL
2015-07-05 15:45:48 -07:00
David Ludwig
d0ba0c1d8a
Fixed bug 3048, "Crashes in Cocoa_SetWindowTitle"
2015-07-04 21:04:49 -04:00
Ryan C. Gordon
65a1a3e7e9
Cocoa: support drag-and-drop of multiple objects.
2015-07-04 14:09:09 -04:00
Sam Lantinga
e8954d5d8c
Hack to fix missing window decorations after toggling fullscreen mode in Mac OS X 10.10
2015-06-30 19:30:02 -07:00
Philipp Wiesemann
0e45984fa0
Fixed crash if initialization of EGL failed but was tried again later.
...
The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly
uninitialized data structure if loading the library first failed. A later try to
use EGL then skipped initialization and assumed it was previously successful
because the data structure now already existed. This led to at least one crash
in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was
dereferenced to make a call to eglBindAPI().
2015-06-21 17:33:46 +02:00