Maia
c2c3a930b4
Add STRING suffix to SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_* string properties
2025-04-04 13:38:02 -07:00
Temdog007
d6d2c958a4
Move global event handlers to SDL_VideoInit
...
Moved the event handlers from SDL_CreateWindow to SDL_VideoInit
emscripten_set_mouseup_callback
emscripten_set_focus_callback
emscripten_set_blur_callback
emscripten_set_pointerlockchange_callback
emscripten_set_fullscreenchange_callback
emscripten_set_resize_callback
2025-04-04 10:21:12 -07:00
Frank Praznik
ca613b9d8f
x11: Send a restored event before entering fullscreen
...
Ensures that the maximized flag is cleared on fullscreen windows.
2025-04-03 17:02:17 -04:00
Frank Praznik
667b706a93
x11: Don't set the hidden flag when minimizing windows
...
On non-compositing window managers, XIconifyWindow can trigger map/unmap events, which would toggle the window hidden/shown state. This should not be done, as a hidden window in SDL is equivalent to a withdrawn window in X, and SDL will try to set/reset state when it is shown again.
Unless the window is explicitly being withdrawn via X11_HideWindow(), set unmapped windows to the minimized/occluded state, and send a restored event when mapped again.
2025-04-03 16:52:27 -04:00
Sam Lantinga
756b455d3a
Fixed building for Xbox One
...
Fixes https://github.com/libsdl-org/SDL/issues/12714
2025-04-03 09:08:56 -07:00
Sam Lantinga
b521400861
Note that the Emscripten window properties are strings
2025-04-02 08:33:16 -07:00
Temdog007
cc8ec6cf18
Handle global mouse state for Emscripten ( #12669 )
2025-04-02 07:21:21 -07:00
Temdog007
cbc26fe2c4
Add Emscripten window data to window properties
2025-04-02 07:19:52 -07:00
Sam Lantinga
c3ce216c4d
Fixed crash at shutdown on Windows
...
The taskbar list is invalid after OleUninitialize(), so make sure we clean it up first.
Also don't bother creating the taskbar list if we don't have any progress state
2025-04-01 14:56:08 -07:00
Frank Praznik
6b1d6bfbe7
wayland: Commit the confinement region upon creation
...
This may prevent the pointer from escaping small regions if moving quickly.
2025-03-31 11:57:42 -04:00
Frank Praznik
266ee41c86
wayland: Defer creating cursor confinement regions until the surface is mapped
...
Otherwise, the confinement area will be lost if the window is recreated when initializing the renderer.
2025-03-31 11:57:42 -04:00
Sam Lantinga
0d04e9ea6a
Fixed build
2025-03-30 21:35:14 -07:00
Sam Lantinga
7bb95bde49
Set the alpha opaque when blending to an RGB format
...
Fixes the render_testRGBSurfaceNoAlpha automated test in sdl2-compat
2025-03-30 21:24:53 -07:00
Frank Praznik
210b317d8d
x11: Popup positions after constraining are in the window-relative space, not global
2025-03-29 14:00:53 -04:00
Sam Lantinga
a23f97483f
Temporarily disable DwmFlush()
...
For some reason this locks up the Windows compositor when called by Steam. I'm disabling it for now until we understand why and whether this can cause issues for other applications as well.
2025-03-28 20:31:07 -07:00
Green Sky
eb918af3dc
video: fix surface leak when duplicating mjpeg
2025-03-28 13:18:28 -07:00
Frank Praznik
401aaf3d2f
video: Revert unnecessary member assignment
2025-03-28 10:21:24 -04:00
Frank Praznik
09fff161e9
cocoa: Clear pending state on fullscreen switch failures
...
The window failing to enter/exit fullscreen notifications don't necessarily imply anything about the actual state of the window. On failure, dump pending events, and don't presume anything about the current window state, as it will be handled by subsequent enter/leave notifications.
2025-03-27 11:57:47 -04:00
Frank Praznik
05d23cae73
cocoa: Re-add sync timeout
...
This should never happen, but it's a failsafe against future bugs or odd configurations
2025-03-27 11:49:02 -04:00
Sam Lantinga
2e61b41652
Don't send relative motion while in a modal loop
...
This fixes queuing up a bunch of relative motion events while moving or resizing a window.
2025-03-27 08:10:50 -07:00
Frank Praznik
8e6eaf12a4
wayland: Expose wl_output objects on video displays
...
Some protocols take a wl_output object to function, so expose them via a property on the video displays.
2025-03-26 13:12:23 -04:00
Sam Lantinga
f355c7f217
Allow the progress API to be used on all platforms
...
It's visually only hooked up on Windows for now, but the API will be internally consistent on all platforms.
2025-03-25 11:24:22 -07:00
Frank Praznik
716e33f106
x11: Send the _XWAYLAND_MAY_GRAB_KEYBOARD message when grabbing the keyboard
...
GNOME requires this to allow keyboard grabs on XWayland. Otherwise, XGrabKeyboard will still report success, but shortcuts won't be inhibited.
See 5f132f3975
2025-03-25 12:35:34 -04:00
Rémy Tassoux
6cc00a31b6
WindowProgressState API getters and fixes ( #12629 )
2025-03-25 08:03:32 -07:00
Frank Praznik
b520cde18f
cocoa: Properly set the pending fullscreen spaces state when in a transition
2025-03-24 23:23:32 -04:00
Frank Praznik
8cb303126f
wayland: Fix global mouse position retrieval
2025-03-24 19:06:05 -04:00
Anonymous Maarten
7f927de1fc
x11: remove 'args' and 'ret' from SDL_X11_SYM macro
...
X11 vararg functions don't extra handling anymore.
2025-03-24 14:32:28 -04:00
Petar Popovic
035d9179a5
WIN_SetWindowProgressState(): Unsupported parameter error message
2025-03-23 10:32:19 -07:00
Petar Popovic
c217663fba
SDL_SetWindowProgressState(): Add parameter validation check for state
2025-03-23 10:00:27 -07:00
Petar Popovic
721476033c
SDL_SetWindowProgressValue(): Move value clamp from WIN_SetWindowProgressValue() to SDL_SetWindowProgressValue()
2025-03-23 08:56:18 -07:00
Sam Lantinga
69ad66b017
Fixed error messages in GetTaskbarList()
2025-03-23 07:58:03 -07:00
Petar Popovic
a3be7a137a
WIN_SetWindowProgressValue(): Fix value clamp
2025-03-23 07:51:49 -07:00
Frank Praznik
027df89ed3
wayland: Scale accelerated relative pointer coordinates with emulated resolutions
...
The accelerated relative coordinates are always relative to the desktop resolution, and need to be scaled with emulated fullscreen resolutions for mouse movement to remain stable. Otherwise, pointer speeds will be too fast on emulated resolutions below the desktop resolution, and too slow on those above.
2025-03-22 14:35:39 -04:00
Rémy Tassoux
7a10fcdccc
Add progress bar support for Windows ( #12530 )
2025-03-22 08:04:10 -07:00
Sam Lantinga
6b13d69105
Improve move/resize visual smoothness on Windows
...
Fixes https://github.com/libsdl-org/SDL/issues/12528
2025-03-21 16:46:25 -07:00
Frank Praznik
b493e29a81
x11: Fix backwards _NET_WM_SYNC_REQUEST init check
2025-03-21 15:32:54 -04:00
Frank Praznik
79081a178f
cocoa: Fix zoom check when leaving fullscreen
...
Non-resizable windows will always report as zoomed, so isZoomed is not a reliable check here.
2025-03-21 14:43:17 -04:00
Frank Praznik
03cdd297e0
video: Fix boolean logic for getting the pending window position
2025-03-21 13:47:38 -04:00
hwsmm
ac5b2b6102
Don't send text event while ctrl/alt is held on X11/Wayland
2025-03-20 22:30:10 -04:00
Temdog007
581b614291
Emscripten: Support Custom Message Boxes ( #12583 )
...
* Allow custom message boxes with colors and multiple buttons to work if Asyncify is enabled
* Keep old functionality of using alert when Asyncify is not available
* Update testmessage to allow for setting random colors as the color scheme of the message box
2025-03-20 16:33:06 -07:00
Sam Lantinga
03a53ce0d1
Always show the on-screen keyboard on Steam Deck
...
Steam will eventually have smarts about whether a keyboard is active and will igore the request appropriately.
Fixes https://github.com/libsdl-org/SDL/issues/12595
2025-03-20 16:19:50 -07:00
Sam Lantinga
8caeaaacdd
A Steam Controller might be generating keyboard input
...
We can't use keyboard input as a signal about whether a keyboard is attached. There might be keyboard input from any number of generated inputs or non-keyboard devices.
2025-03-20 16:19:50 -07:00
Sam Lantinga
cbb83be895
Show the on-screen keyboard if we don't have active keyboard input
...
Active keyboard input is based on the input the user has most recently sent.
Fixes https://github.com/libsdl-org/SDL/issues/12595
2025-03-20 16:19:50 -07:00
Sam Lantinga
476e7e54cb
Don't create surfaces with invalid pixel formats
...
Fixes https://github.com/libsdl-org/SDL/issues/12556
2025-03-20 09:42:52 -07:00
Sam Lantinga
f2ed5c7a1b
Fix illegal calls to DwmGetWindowAttribute()
...
DWMWA_WINDOW_CORNER_PREFERENCE and DWMWA_BORDER_COLOR are only supported for DwmSetWindowAttribute(), they can't be queried.
Fixes https://github.com/libsdl-org/SDL/issues/12206
Closes https://github.com/libsdl-org/SDL/pull/12209
2025-03-19 22:00:42 -07:00
Sam Lantinga
96bf12444c
Windows allows windows to be resized to zero height.
...
Changed the window client rect validation to take this into account.
Fixes https://github.com/libsdl-org/SDL/issues/9796
2025-03-19 21:16:35 -07:00
Sam Lantinga
3415bc920a
Fixed crash if a window couldn't be created on Windows
...
Fixes https://github.com/libsdl-org/SDL/issues/11482
2025-03-19 20:10:24 -07:00
Sam Lantinga
8b924df48b
Use an autoreleasepool in Cocoa_GetDisplayUsableBounds()
...
Fixes https://github.com/libsdl-org/SDL/issues/12571
2025-03-18 14:36:48 -07:00
Frank Praznik
d66483dfcc
video: Send pending coordinates for moved, hidden windows
...
Some backends can't actually position a window until it is shown/mapped, so assume that it will be where it was asked to be as long as it is hidden.
2025-03-16 11:33:12 -04:00
Sam Lantinga
501e71f25f
Added unaligned version of SDL_ConvertPixels_SwapNV_std()
...
Fixes https://github.com/libsdl-org/SDL/issues/12546
2025-03-15 09:24:25 -07:00