We can't directly set the mouse focus since we may get spammed by entered/exited events,
but we can process the current focus later in the mouseMoved handler in line with the
mouse motion event sequence.
Fixes https://github.com/libsdl-org/SDL/issues/8188
Returning anything other an HTCLIENT result will cause windows to eat the button press, so ensure that non-left presses are passed through to the client over draggable areas.
The existing algorithm works well for min-max ratios, but didn't allow edge expansion of fixed aspect ratio windows. Use NSWindow setContentAspectRatio instead.
This can happen if all the windows shown have the SDL_WINDOW_NOT_FOCUSABLE flag. We'll still accept modifier state changes though, so you can do Control-click actions.
Corrected the calculation of the vertical hotspot position in the `GetCachedCursor` function.
Changed the variable from `data->hot_x` to `data->hot_y` to ensure the correct vertical position of the cursor's hotspot is used when scaling.
We require at least Xcode 12.2 and macOS SDK 11 to build. We support deploying to macOS 10.13, iOS 11.0, and tvOS 11.0.
This cleans up the code significantly
SDL_CreateTray now respects SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL
and SDL_HINT_WINDOWS_INTRESOURCE_ICON hints and uses the specified icon
as the tray icon.
Adds SDL_HINT_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY to control whether or not the menu can be accessed when the cursor is moved to the top of the screen when a window is in fullscreen spaces mode.
The three values are true, false, and 'auto' (default), with auto resulting in a hidden menu if fullscreen was toggled programmatically, and the menu being accessible if fullscreen was toggled via the button on the window title bar, so the user has an easy way back out of fullscreen if the client app/game doesn't have a readily available option to toggle it.
This was originally intended to make sure that nativeAllowRecreateActivity() could be called from another thread safely, but the hint system is now thread-safe, so we don't need to use a callback here.
Fixes https://github.com/libsdl-org/SDL/issues/11938
This is just enough to delay MOUSE_LEAVE events until a drag ending outside
the canvas is released, and make sure the MOUSE_UP event has the canvas's
SDL_WindowID, which it wouldn't when mouse focus is was lost by this point.
Fixes#10033.
Any requested swap interval will be saved and set on the first PumpEvents.
Once PumpEvents has been called at least once, swap intervals are set
immediately.
This assumes that events won't be pumped until after an Emscripten main loop
has been defined, and so prevents a warning on the javascript console:
"emscripten_set_main_loop_timing: Cannot set timing mode for main loop since
a main loop does not exist! Call emscripten_set_main_loop first to set one
up."
Fixes#9969.