Sam Lantinga
b1c2dd8433
Make sure the current resolution is in the fullscreen mode list
...
Custom resolutions don't enumerate normally, but make sure the current resolution is in the mode list.
Fixes https://github.com/libsdl-org/SDL/issues/11551
2025-10-02 15:19:41 -07:00
Ryan C. Gordon
24b47814f8
emscripten: Another attempt at optionally having the canvas use whole window.
...
Fixes #11949 .
2025-10-02 13:01:35 -04:00
Frank Praznik
e5c28c5326
wayland: Fix variable scope
2025-10-02 12:02:57 -04:00
Frank Praznik
9461db1ec8
Fix typo
2025-10-01 19:21:10 -04:00
Frank Praznik
9182b8ab61
wayland: Add a fallback for xkb_keymap_key_get_syms_by_level() for old xkbcommon versions
...
This function is only available since version 1.0.0, but the SDL minimum is 0.5.0, and Steam Runtime 2 'soldier' uses 0.8.2, so add a fallback function with similar functionality for older versions.
xkb_keymap_key_get_mods_for_level() is more efficient, so it is still favored when available.
2025-10-01 17:59:07 -04:00
Mathieu Eyraud
409bb7722c
Fix uninitialized variables
2025-10-01 07:21:44 -07:00
Frank Praznik
b54c5fd79c
x11: Check for a valid input context before destroying it
...
XDestroyIC crashes if passed a null parameter.
2025-09-30 14:48:39 -04:00
Ozkan Sezer
5fffa8b9ad
SDL_video_unsupported.c: fix SDL_iOSAnimationCallback type redefinition error
2025-09-29 08:41:14 +03:00
mccakit
26f961ab05
wasm64 fix
2025-09-27 11:41:31 -04:00
Frank Praznik
191f46dd36
wayland: Rename some callbacks to be closer to their canonical Wayland names
...
The old names made it difficult for people searching or otherwise trying to understand the codebase, as they were somewhat mangled from their expected names (e.g. configure_toplevel_xdg vs xdg_toplevel_configure, the latter of which would be expected by someone reading the spec).
2025-09-27 10:59:52 -04:00
Anonymous Maarten
cdc4609993
Add headers for unsupported sources
2025-09-26 21:42:04 +02:00
eafton
cd9919dc51
X11TK: Implement high contrast, dark themes and fix up some more positioning code ( #14055 )
2025-09-26 10:30:28 -07:00
Sam Lantinga
c39d772a07
Added a workaround for fullscreen mouse position on macOS 26
2025-09-25 15:10:08 -07:00
eafton
f3a9f66292
Add more Unicode tests to testmessage, improve fallback fonts in X11TK ( #14042 )
2025-09-24 14:23:27 -07:00
eafton
0b9a197eda
X11TK: Remove text positioning hacks, use proper ascent values. ( #14040 )
2025-09-24 11:26:12 -07:00
Frank Praznik
9d5d7010de
wayland: Ignore bogus libdecor content sizes if an unmapped window is suspended
...
If a client takes a long time to present the first frame after creating the window, a configure event to set the suspended state may arrive with libdecor increasing the content size by the decoration dimensions, which should be ignored.
2025-09-24 10:34:42 -04:00
Frank Praznik
45480f5fe5
x11: Use the pending size for the min/max limits if a resize is in flight
...
Otherwise, an outdated size may be used, reverting the requested resize operation.
2025-09-24 10:34:42 -04:00
Sam Lantinga
0a50058f7a
Use the real window position on macOS
...
On newer MacBooks, the fullscreen window might be placed below the camera notch, so use the actual window position
Fixes https://github.com/libsdl-org/SDL/issues/10441
2025-09-23 22:57:21 -07:00
Sam Lantinga
221d1f12ea
Use an empty bitmap for the blank cursor on macOS
...
Some macOS installations seem to have trouble decoding the GIF we were using
Fixes https://github.com/libsdl-org/SDL/issues/14012
2025-09-22 19:14:38 -07:00
Frank Praznik
18195c5ef0
x11: Add #ifdef guards to the XInput2 quit function
...
Fixes building if XInput2 isn't available.
2025-09-22 17:48:12 -04:00
Frank Praznik
733335e272
x11: Apply remapping to XInput2 mouse button events from slave devices
...
Slave pointer devices report raw button values, while the master pointer device reports button values with remapping applied. Manually apply the remapping table to slave device buttons to eliminate multiple button events from one press, and allow button remapping to function when relative mode is active.
2025-09-22 17:33:31 -04:00
eafton
4363582e6d
X11TK: Fix build
2025-09-22 14:31:13 -07:00
eafton
7cc477d458
X11TK: Even more failsafes for fonts
2025-09-22 14:31:13 -07:00
eafton
773db8eb75
X11TK: Even more failsafes for fonts
2025-09-22 14:31:13 -07:00
eafton
8cbd5d5b25
X11TK: Use SDL_roundf instead of normal roundf
2025-09-22 14:31:13 -07:00
eafton
667eac3354
X11TK: Formatting
2025-09-22 14:31:13 -07:00
eafton
fb99dfc076
X11TK: Cleanups, reduce scaling factor if a font cant be found
2025-09-22 14:31:13 -07:00
Sam Lantinga
cece47c64d
Fixed iOS build
2025-09-22 11:27:07 -07:00
Sam Lantinga
137b0b2bee
The default swap interval on EGL is 1, according to the spec
...
Fixes https://github.com/libsdl-org/SDL/issues/14014
2025-09-22 10:23:08 -07:00
Sam Lantinga
7563a3e17d
Fixed clipboard tests on iOS
2025-09-22 10:09:30 -07:00
Ryan C. Gordon
c8eb9f3706
x11: Set EGL surface for foreign X11 windows.
...
Cherry-picked by hand from SDL2: 780ec8fac0
Also cleaned up the XDestroyIC cleanup code to match the setup code.
Fixes #11996 .
2025-09-22 10:37:52 -04:00
Sam Lantinga
bce2a336d2
Use the default window focus behavior on macOS
...
We had to work around odd behavior in really old versions of macOS, but the current behavior is great.
Fixes https://github.com/libsdl-org/SDL/issues/3954
2025-09-20 18:57:22 -07:00
Sam Lantinga
8eeae5f686
The wayland messagebox should only be used under wayland
2025-09-20 09:06:07 -07:00
Andrei Sabalenka
bb2b39b8ea
wayland: fix typo in xdg_positioner_set_anchor_rect
2025-09-20 08:53:49 -07:00
Sam Lantinga
597ef58966
Use zenity messageboxes by default on X11
...
This makes messageboxes consistent between X11 and Wayland.
2025-09-20 08:37:51 -07:00
Frank Praznik
9b72545634
video: Clamp HDR levels before comparing for deduplication
...
Eliminates some redundant HDR changed events due to comparing clamped and unclamped values.
2025-09-19 12:36:59 -04:00
Sam Lantinga
0eff3fe558
Fixed double-free when using window surfaces
2025-09-18 20:58:32 -07:00
Sam Lantinga
25b2d2c821
Use new parameter validation macro
2025-09-18 20:58:32 -07:00
Frank Praznik
f540de87b9
wayland: Always set the last incoming clipboard seat when setting clipboard data
...
Otherwise, the clipboard will report having no or old data until events are pumped.
Fixes the automated clipboard tests.
2025-09-18 17:44:58 -04:00
Frank Praznik
03e1523eb8
wayland: Add the libdecor toplevel bounds and constraints properties
2025-09-16 11:07:27 -04:00
Eddy Jansson
21c9f5304d
wayland: Silence unused variable warning
...
'vd' and 'd' are only used if SDL_USE_LIBDBUS is set.
2025-09-15 10:26:23 -04:00
Sam Lantinga
dac6af4ba6
Only use a transparent cursor on Windows when connected via RDP
...
VMware relies on the cursor being set to NULL to optimize relative mouse motion for games.
We should also revisit whether current RDP works better with a NULL cursor or a transparent cursor.
Fixes https://github.com/libsdl-org/SDL/issues/13700
2025-09-14 17:24:40 -07:00
Sam Lantinga
f8bace9b9b
Remove the behavior of warping the mouse on fullscreen transitions
...
This made sense when switching between a window and an exclusive fullscreen video mode of the same dimensions, but it causes user confusion when the window changes size, and doesn't work well with Wayland. I've gotten this feedback from several sources, so we'll just go ahead and remove this behavior for now.
Fixes https://github.com/libsdl-org/SDL/issues/11577
2025-09-14 13:18:30 -07:00
Sam Lantinga
113c7e8a58
Fixed delayed text entry for OTP codes on iOS (thanks @pipiwoaini!)
...
Fixes https://github.com/libsdl-org/SDL/issues/13717
2025-09-14 08:08:13 -07:00
Frank Praznik
4561be89a5
x11: Use the SDL_WindowFlags type instead of Uint32
...
Uint32 can potentially truncate the flag value, as it is 64 bits in SDL3.
2025-09-13 15:44:29 -04:00
Cameron Cawley
bd680bdbcc
Consistently use SDL_PIXELFORMAT_RGBA32 with Emscripten
2025-09-13 07:41:33 -07:00
Ryan C. Gordon
98e22213da
emscripten: Do a little better at tracking Caps/Num/Scroll Lock state.
...
Fixes #5447 .
2025-09-13 01:50:22 -04:00
Sam Lantinga
3ddc3f1146
Send events for mice and keyboards detected during initialization
...
Fixes https://github.com/libsdl-org/SDL/issues/12815
2025-09-11 20:07:55 -07:00
Temdog007
4efdfd92a2
Emscripten: Ensure drop functionality is the same as other platforms
2025-09-10 15:22:04 -07:00
Temdog007
6711caa431
Emscripten: Fix Emscripten_GetFocusedWindow
...
Ensure a window is focused if the DOM is focused
2025-09-10 14:53:28 -07:00