Sam Lantinga
fe9bdcf508
Added SDL_HINT_VIDEO_X11_EXTERNAL_WINDOW_INPUT
2025-03-05 09:07:05 -08:00
SDL Wiki Bot
9f557941f3
Sync SDL3 wiki -> header
...
[ci skip]
2025-03-05 15:25:22 +00:00
Sam Lantinga
8f40dad460
Document the thread safety of SDL surface functions
2025-03-05 07:24:24 -08:00
Sam Lantinga
aef240b2e4
Fixed continuous logging if returning to desktop mode fails on X11
2025-03-04 17:24:29 -08:00
Sam Lantinga
e9632c83c7
Handle XWayland not sending display disconnected events
...
Also updated X11_CheckDisplaysMoved() to handle multiple X11 screens
Fixes https://github.com/libsdl-org/SDL/issues/12462
2025-03-04 17:23:23 -08:00
Sam Lantinga
ca9bc6b164
Revert "Ignore BadRROutput errors from XRRGetOutputInfo()"
...
This reverts commit 0c8ddc1f0a
.
The real bug here is that XWayland isn't sending us a display disconnected event, which will be handled in the next commit.
2025-03-04 17:16:35 -08:00
Sam Lantinga
0c8ddc1f0a
Ignore BadRROutput errors from XRRGetOutputInfo()
...
Fixes https://github.com/libsdl-org/SDL/issues/12462
2025-03-04 16:08:41 -08:00
Sam Lantinga
80ae3a7516
Fixed crash when restoring the desktop mode on macOS
...
Fixes https://github.com/libsdl-org/SDL/issues/12460
2025-03-04 14:31:51 -08:00
Sam Lantinga
5f07347e4f
Fixed crash unplugging a HIDAPI controller
2025-03-04 11:42:17 -08:00
Sam Lantinga
82552e5b7c
Make SDL_RegisterEvents() thread-safe
...
Fixes https://github.com/libsdl-org/SDL/issues/12457
2025-03-04 10:27:55 -08:00
Frank Praznik
9f9a442823
video: Synthesize fullscreen related moves if the driver does not.
2025-03-04 12:41:06 -05:00
Frank Praznik
e7abbf158a
x11: Synthesize fullscreen size events on Openbox
...
Openbox doesn't send size events when entering fullscreen, so they must be synthesized. This is not desirable on any other window manager, as it can break fullscreen positioning on multi-monitor configurations.
2025-03-04 12:41:06 -05:00
Sam Lantinga
5d20bbf348
Presenting while drawing to a render target should fail.
...
People are adding present calls while rendering to render targets, not understanding that this doesn't make sense, and wondering why they get flicker on some systems. If there are programs that relied on the previous behavior we can add a hint to control this.
Fixes https://github.com/libsdl-org/SDL/issues/12432
2025-03-04 08:46:13 -08:00
Volian0
debbe1cf75
Fix for Message Box failing to init on X11 ( #12455 )
...
Fixed X11 message boxes failing to initialize, because the proper X Logical Font Description could not be found
2025-03-04 08:29:08 -08:00
Sam Lantinga
4bb46e93c8
Fixed clip rect when logical presentation is enabled
...
We don't need to include the logical offset, it's already included in the viewport.
Fixes https://github.com/libsdl-org/SDL/issues/12454
2025-03-04 08:24:18 -08:00
SDL Wiki Bot
7df0ffd436
Sync SDL3 wiki -> header
...
[ci skip]
2025-03-04 13:27:13 +00:00
Sam Lantinga
7c29c8b266
Added fullscreen_active to better track fullscreen state
...
This is true if fullscreen is pending or currently active. This is a better check in SDL_SetDesktopDisplayMode() because a fullscreen mode may be pending and complete asynchronously and the window hasn't been set to fullscreen yet.
2025-03-03 21:18:42 -08:00
Frank Praznik
3b9f0dff10
Use _this pointer to reference the video device
2025-03-03 18:39:44 -05:00
Frank Praznik
0ccf272eea
Check the display device before dereferencing
...
It can be null if the desktop mode is set early during initial display enumeration.
2025-03-03 11:24:25 -05:00
Frank Praznik
6c347cbf33
video: Handle Cocoa desktop mode switch inhibition in the video layer
...
The X backend had the same issue, so both Cocoa and X can be handled in the same location.
2025-03-03 10:50:20 -05:00
Sam Lantinga
24ec2ed785
Don't save temporary mode changes to the desktop mode
...
Fixes https://github.com/libsdl-org/SDL/issues/12441
2025-03-03 07:40:55 -08:00
Simon McVittie
d57aa6f7af
pipewire: Don't require pw_check_library_version() with Pipewire < 0.3.75
...
The Debian 12 'bookworm' stable release only has 0.3.65, which is earlier
than the introduction of that symbol. Similarly, Steam Runtime 3 'sniper'
and Steam Runtime 2 'soldier' have a backport of 0.3.65 from Debian 12,
so they have the same limitation.
steamrt/tasks#686
Signed-off-by: Simon McVittie <smcv@collabora.com >
2025-03-03 07:32:19 -08:00
Caleb Cornett
113eb6f01d
gpu: Add BC2_RGBA_UNORM_SRGB to GetBlockWidth/Height functions
2025-03-03 01:35:16 -05:00
Sam Lantinga
2c7c3d4d7b
Only use VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR on Android
...
This fixes Nintendo Switch where the identity bit isn't available. We only needed this on Android to automatically handle device user orientation.
2025-03-02 09:12:48 -08:00
Ozkan Sezer
ca3c5fd409
fix build: s/SDL_DetectSandbox/SDL_GetSandbox/
2025-03-02 19:40:02 +03:00
kemal
eac63b4735
Add the definition for DBUS_TYPE_UNIX_FD to SDL_dbus.h
2025-03-02 08:03:57 -08:00
kemal
16f12c0d55
Implement the XDP Camera portal
...
This helps the Pipewire camera driver to access cameras
in a sandboxed environment without host Pipewire socket access.
Unlike other platforms, no event is sent when the user rejects
camera access. This is because there is no mechanism to query
cameras through the portal, and we only obtain access to the
Pipewire fd if the user accepts the request. The Pipewire driver
will attempt to open the host socket instead.
2025-03-02 08:03:57 -08:00
SDL Wiki Bot
c3b415641a
Sync SDL3 wiki -> header
...
[ci skip]
2025-03-02 15:56:34 +00:00
SDL Wiki Bot
2a0223487f
Sync SDL3 wiki -> header
...
[ci skip]
2025-03-02 15:55:59 +00:00
Sam Lantinga
1a7c206986
Save and restore error messages when rolling back after failed init
...
Fixes https://github.com/libsdl-org/SDL/issues/12439
2025-03-02 07:55:56 -08:00
Sam Lantinga
2c46c3d5b7
Updated dynamic API for new functions
2025-03-02 07:53:51 -08:00
expikr
5373271a12
forbid transform change while relative mode active
2025-03-02 07:53:09 -08:00
expikr
428f0dcd61
add SDL_SetRelativeMouseTransform
2025-03-02 07:53:09 -08:00
Arkadiusz Lach
67127afe3f
Fix from #12118
2025-03-02 07:52:25 -08:00
Arkadiusz Lach
e25ee22469
Added tiled 9-grid texture rendering function
...
* New function SDL_RenderTexture9GridTiled, borders and center is tiled instead of stretched
2025-03-02 07:52:25 -08:00
SDL Wiki Bot
954675b32a
Sync SDL3 wiki -> header
...
[ci skip]
2025-03-02 15:52:11 +00:00
Arkadiusz Lach
44bca81fdd
Change default texture scale mode per renderer
...
* SDL_SetDefaultTextureScaleMode(SDL_Renderer *renderer, SDL_ScaleMode scale_mode)
* SDL_GetDefaultTextureScaleMode(SDL_Renderer *renderer, SDL_ScaleMode *scale_mode)
2025-03-02 07:51:17 -08:00
Caleb Cornett
b0d2a4f355
gpu: Fix Z offset for D3D12 realigned 3D texture uploads
2025-03-02 00:04:57 -05:00
Frank Praznik
b69201daeb
cocoa: Don't overwrite the desktop mode when changing the fullscreen mode
...
Changing the mode triggers a display reconfiguration event, which will overwrite the desktop mode with the set fullscreen mode, preventing proper restoration when leaving fullscreen. Don't overwrite the desktop mode if the reconfiguration is due to a fullscreen mode switch.
2025-03-01 22:55:38 -05:00
Frank Praznik
078d737a27
cocoa: Run pending events to completion
...
Fullscreen spaces and miniaturization will always give us some notification that they succeeded or failed, so the timeout isn't required. This prevents errant timeouts when live-resize is active.
2025-03-01 19:33:38 -08:00
Sam Lantinga
b0df1cbbef
Updated to version 3.3.0 for development
2025-03-01 19:31:00 -08:00
Sam Lantinga
65864190cc
Added testpen to the Xcode test project
release-3.2.6
2025-03-01 18:49:25 -08:00
Sam Lantinga
292e431748
Updated to version 3.2.6 for release
2025-03-01 18:30:34 -08:00
Sam Lantinga
f0cb78e082
Handle XCreateIC() failing when composition UI is enabled
...
Fixes https://github.com/libsdl-org/sdl2-compat/issues/328
2025-03-01 13:54:07 -08:00
Sam Lantinga
55484ef023
Moved WIN_UpdateMouseCapture() to be with the other mouse functions
2025-03-01 12:54:17 -08:00
Sam Lantinga
020664bd10
Update mouse button state when re-entering a window
...
Fixes https://github.com/libsdl-org/SDL/issues/12423
2025-03-01 12:54:17 -08:00
Sam Lantinga
b836ad4d4f
Fix a root signature mismatch for the D3D12 renderer
...
The shaders hadn't been rebuilt after c74f273848
Fixes https://github.com/libsdl-org/SDL/issues/12276
2025-03-01 12:02:49 -08:00
Ryan C. Gordon
a88105784f
camera: Delete some failure code that should have been removed before.
2025-03-01 14:52:56 -05:00
Brick
f868408a3a
Ceil the audio resampling rate to avoid over-estimating output samples.
...
Reverts 580a496391
, fixes #12115
2025-03-01 11:07:55 -08:00
Anonymous Maarten
cbdc93b17f
cmake: make sure a SDL3 library is present when not using COMPONENTs
2025-03-01 17:54:45 +01:00