Frank Praznik
224f2e921e
video: Remove unused bootstrap declarations
...
Pandora and KMSDRM_Legacy are not used anywhere.
2024-04-08 11:07:05 -04:00
Sam Lantinga
5fa87e29e7
Removed SDL_RENDERER_ACCELERATED and SDL_RENDERER_SOFTWARE
...
These flags are unnecessary and have always been a source of confusion.
2024-04-04 13:30:49 -07:00
Sam Lantinga
a8ed32c5f7
Re-enable cursor clipping when clicking into a window when relative mouse mode is enabled
2024-04-03 12:41:19 -07:00
Frank Praznik
2d9aff6433
wayland: Always use the whole buffer surface for the damage region
...
Using the current window size at the time of the call may not be correct if the window or buffer size was changed after the fact, so always set the damage region to cover the entire buffer.
2024-04-03 11:07:08 -04:00
Clownacy
65e7c8e265
Fix default Windows window icon not suiting the DPI.
...
For whatever reason, `ExtractIconEx` returns icons whose sizes are
inappropriate for the current DPI, resulting in terribly-blurry
window icons at higher DPIs.
To solve this, the window icon is now set to the first icon group
that is present in the executable. This behaviour should match what
Explorer does. By selecting an icon group instead of a specific icon,
Windows is free to select the icon within the group that best suits
the current DPI.
(cherry picked from commit 1fa6142903 )
2024-04-02 12:04:52 -07:00
Brian Collins
560daa07f2
Workaround a macOS cursor-related bug.
...
This fixes an macOS bug that is only known to occur in fullscreen windows on the built-in displays of newer MacBooks with camera notches. When the mouse is moved near the top of such a window (within about 44 units) and then moved back down, the cursor rects aren't respected. This can cause the default cursor to be visible when it should not be.
(cherry picked from commit f1690e265e )
2024-04-01 16:21:24 -07:00
Sam Lantinga
fbbee04423
Revert "Only clear the raw input queue status if we don't call GetRawInputBuffer()"
...
This reverts commit 02c63667c7 .
It turns out that QS_RAWINPUT isn't actually cleared by GetRawInputBuffer(). See https://github.com/libsdl-org/SDL/issues/9409 for more details.
2024-03-31 12:44:13 -07:00
Mathieu Eyraud
4d00706f57
Do not store pointer before potentialy freeing it
...
Store data to windows->driverdata after call to SetProp() in case it fails.
2024-03-30 11:07:42 -07:00
Mathieu Eyraud
36dec0bf4e
Fix return value of WIN_GetMonitorPathInfo
2024-03-30 11:04:32 -07:00
Sam Lantinga
8201b6dc4d
Added support for raw mousewheel events
2024-03-30 07:38:38 -07:00
Sam Lantinga
4a00d34a86
Always send raw mouse button state changes
...
Fixes https://github.com/libsdl-org/SDL/issues/9395
2024-03-30 07:30:43 -07:00
Sam Lantinga
af5728b94d
Fixed event handle accumulation when the SDL window doesn't have focus
...
This also fixes a crash on shutdown caused by the raw input thread failing to stop
2024-03-28 15:11:45 -07:00
Sam Lantinga
47378eddf6
Fixed error: ordered comparison of pointer with integer zero
2024-03-28 09:34:48 -07:00
Sam Lantinga
fc81d4e5fc
Fixed 64-bit conversion warnings
2024-03-28 09:12:26 -07:00
Sam Lantinga
c8489a3710
Disable XInput2 keyboard events
...
It turns out they're only delivered to the window with mouse focus, not keyboard focus.
Fixes https://github.com/libsdl-org/SDL/issues/9374
2024-03-28 08:50:47 -07:00
Sam Lantinga
02c63667c7
Only clear the raw input queue status if we don't call GetRawInputBuffer()
...
GetRawInputBuffer() will do that for us when we read all the queued events
2024-03-26 15:27:57 -07:00
Sam Lantinga
d6fc629b5b
Fixed Windows rawinput crash
...
RAWINPUT structures are variable size
2024-03-26 15:27:57 -07:00
Frank Praznik
8f14fa1113
video: Destroy the associated renderer when a window is destroyed
...
This was previous behavior that used window userdata and was lost during the move to properties. Renderer objects need to be cleaned up when their associated windows are destroyed, or they can be leaked and backend refcounts won't be properly updated, leading to them not being properly shut down when SDL_Quit() is called.
2024-03-26 13:10:14 -07:00
Sam Lantinga
f0cd3ed330
x11: don't send raw mouse motion when the application doesn't have focus
2024-03-26 13:10:54 -07:00
Sam Lantinga
c47f9b9b54
x11: fixed mouse and keyboard input when XInput2 isn't available
2024-03-26 13:01:00 -07:00
Sam Lantinga
35785d1354
SDL_CreateWindowTexture() shouldn't use 10-bit or float textures
2024-03-26 10:40:40 -07:00
Sam Lantinga
696ecca499
Fixed SDL_MapRGB(), SDL_MapRGBA(), SDL_GetRGB() and SDL_GetRGBA() when used with 10-bit pixel formats
...
Fixes https://github.com/libsdl-org/SDL/issues/9367
2024-03-26 10:40:40 -07:00
Sam Lantinga
3eb8f35f3b
windows: handle the Pause key sequence for raw keyboard input
2024-03-26 09:22:00 -07:00
Daniel Ludwig
4562b41a4d
VisualC-GDK: Add missing dialog sources, fix Xbox builds
2024-03-26 07:28:22 -07:00
Ozkan Sezer
693c75e36e
SDL_x11events.c: fix build if Xinput2 is not available after 3dfc3b4c8
2024-03-26 11:56:02 +03:00
Ozkan Sezer
0556362c38
SDL_windowsevents.c: comment out unused local mouse var after 70b5cd44
2024-03-26 11:47:32 +03:00
Sam Lantinga
70b5cd44ec
windows: explicitly check whether raw_mouse_enabled is true before handling Windows mouse messages
2024-03-25 20:49:16 -07:00
Sam Lantinga
3dfc3b4c8d
x11: added hotplug support for XInput2 devices
2024-03-25 20:41:05 -07:00
Sam Lantinga
f1f24b173c
Added support for multiple distinct keyboards
2024-03-25 20:41:05 -07:00
Sam Lantinga
78c7834f90
Added SDL_HINT_WINDOWS_RAW_KEYBOARD to control whether raw keyboard is enabled on Windows
2024-03-25 20:41:05 -07:00
Frank Praznik
ffc3f71aa2
wayland: Use the floating width/height for initial window creation
...
The dimensions for fixed-size state set via window flags will be applied later in the window creation process.
Restores the window to the proper windowed size when leaving fullscreen.
2024-03-25 18:54:27 -04:00
Sam Lantinga
b9a88bbecb
Removed SDL_TextInputShown()
...
This was only implemented on Windows and often confused with SDL_ScreenKeyboardShown()
2024-03-25 13:26:23 -07:00
Sam Lantinga
6443c75eda
Removed SDL_TEXTINPUTEVENT_TEXT_SIZE
2024-03-25 13:26:23 -07:00
Sam Lantinga
fa236f169b
Only do work to process text events if text input is active
...
Fixes https://github.com/libsdl-org/SDL/issues/9353
2024-03-25 13:26:23 -07:00
Sam Lantinga
658f3cdcf1
x11: use XInput2 for lower level access to keyboard events
2024-03-25 13:26:23 -07:00
Sam Lantinga
012fc1e32b
windows: enable raw keyboard input when raw mouse input is enabled
2024-03-25 13:26:23 -07:00
Sam Lantinga
35d335e61f
Fixed warning C4267: 'function': conversion from 'size_t' to 'DWORD', possible loss of data
2024-03-25 11:46:47 -07:00
Sam Lantinga
07c49d1a67
Fixed text input being active after SDL_StopTextInput() (thanks @AntTheAlchemist!)
2024-03-25 06:46:23 -07:00
Cameron Gutman
f14fb979c1
Remove legacy SDL2 input grab API
2024-03-24 16:53:23 -07:00
Sam Lantinga
13933222ee
Fixed string comparison (thanks @meyraud705!)
2024-03-24 11:37:03 -07:00
Frank Praznik
9e460ce6a6
wayland: Pass the keyboard ID through to repeat events
2024-03-24 08:49:29 -04:00
Sam Lantinga
c83d0d87c2
Revert "Added virtual keyboard support for Xbox (thanks @ts-13512)"
...
This reverts commit b5d4206b30 .
@nkrapivin already implemented GDK virtual keyboard support in https://github.com/libsdl-org/SDL/pull/7728
2024-03-23 16:47:59 -07:00
Anonymous Maarten
f030533580
SDL_blit: remove SDL_BLIT_CPU_FEATURES override
2024-03-23 16:36:44 -07:00
Sam Lantinga
b5d4206b30
Added virtual keyboard support for Xbox (thanks @ts-13512)
2024-03-23 16:34:43 -07:00
Frank Praznik
87714ce5b9
wayland: Set the keyboard and mouse names to match XWayland
2024-03-23 16:31:00 -07:00
Sam Lantinga
72fc6f86e5
Text input is no longer automatically enabled when initializing video.
...
Fixes https://github.com/libsdl-org/SDL/issues/9309
Fixes https://github.com/libsdl-org/SDL/issues/9268
2024-03-23 16:31:00 -07:00
Sam Lantinga
361b7190df
Track unique button states between different mice
...
We were already halfway doing this, but now we make that information available to the Windows driver so it can cache the button state per-mouse
2024-03-23 16:31:00 -07:00
Sam Lantinga
35756593d6
Use the correct device ID (global or default or specific) based on context
2024-03-23 16:31:00 -07:00
Sam Lantinga
c0f4565552
Added SDL_GetKeyboardName() and SDL_GetMouseName()
2024-03-23 16:31:00 -07:00
Sam Lantinga
20a860c876
Use the specific pointer device ID for X11 button and motion events
2024-03-23 16:31:00 -07:00