|
98f93d0a
|
2022-11-15T11:39:06
|
|
Fixed building without xkbcommon support
|
|
615901db
|
2022-11-15T11:19:08
|
|
Removed unnecessary header
The xkbcommon-keysyms.h header isn't available on some older systems,
and we don't actually need it for this code.
|
|
0e446c54
|
2022-11-04T12:27:36
|
|
events: Factor out the xkb keysym to scancode conversion from the X11 driver
|
|
c8551847
|
2022-11-04T12:41:46
|
|
wayland: Handle virtual keyboards that don't fit the X mapping
SDL is built around the concept of keyboards having a fixed layout with scancodes that correspond to physical keys no matter what linguistic layout is used. Virtual keyboards don't have this concept and can present an arbitrary layout of keys with arbitrary scancodes and names, which don't fit the SDL model. When one of these keyboards is encountered, it requires special handling: use the keysym of the pressed keys to derive their ANSI keyboard scancode equivalents for control keys and ASCII characters. All other characters are passed through as text events only.
|
|
d1858eb1
|
2022-11-04T12:33:45
|
|
events: Add a helper function to get the default keycode for a scancode
Add a helper function to get the keycode for a scancode from the default lookup table. Unlike SDL_GetKeyFromScancode(), this is not affected by the set keymap.
|
|
b886f4c6
|
2022-11-14T17:35:28
|
|
events: eliminate redundant code in SDL_SendEditingText
|
|
e873d609
|
2022-11-07T10:02:06
|
|
fix handling of SDL_EventQ.active
- SDL_EventQ.active is a bool variable -> do not use SDL_AtomicGet/Set, it does not help in any way
- protect SDL_EventQ.active with SDL_EventQ.lock
- set SDL_EventQ.active to FALSE by default
|
|
9c8b1fd8
|
2022-10-29T22:34:05
|
|
wayland: Cleanup work to aid reconnect support
Co-authored-by: David Edmundson <kde@davidedmundson.co.uk>
|
|
b9e1d1b4
|
2022-10-09T19:49:34
|
|
events: Rename SDL_SendKeyboardKeyComplete to SDL_SendKeyboardKeyAndKeycode.+
|
|
92215481
|
2022-10-09T19:33:52
|
|
emscripten: Make an attempt at correct keyboard scancode/keycodes.
This uses a newer browser API to get physical scancodes, but still
uses the (deprecated) event field that we were already using for
scancodes, but for keycodes instead now, which appears to be more
accurate.
Since keyboard layout isn't (generally) available to web apps, this
adds an internal interface to send key events with both scancode
and keycode to SDL's internals, instead of sending just scancodes and
expecting SDL to use its own keymap to generate keycodes.
Future work in this area would be to use the keyboard layout APIs
on browsers that support them, which would allow us to use SDL's
usual keymap code and not rely on a deprecated browser API, but
until we get there, this patch gives significantly more correct
results than we would have before.
Fixes #2098.
|
|
965ba1e0
|
2022-10-18T19:03:19
|
|
fix SDL_SendEditingText when long composition text is enabled and strlen(text) == SDL_TEXTEDITINGEVENT_TEXT_SIZE
|
|
6bb0c2a5
|
2022-10-14T06:33:38
|
|
Added documentation for some scancodes
|
|
99f2a503
|
2022-10-13T22:40:24
|
|
X11 scancode mapping cleanup
* Consolidated scancode mapping tables into a single location for all backends
* Verified that the xfree86_scancode_table2 is largely identical to the Linux scancode table
* Updated the Linux scancode table with the latest kernel keycodes (still unmapped)
* Route X11 keysym -> scancode mapping through the linux scancode table (which a few hand-written exceptions), which will allow mappings to automatically get picked up as they are added in the Linux scancode table
* Disabled verbose reporting of missing keysym mappings, we have enough data for now
|
|
b18c361b
|
2022-10-08T13:18:00
|
|
Updated variable name for mouse coordinates in mouse wheel events
|
|
4f318c90
|
2022-10-08T12:01:42
|
|
Add cursor position to mouse wheel event (thanks @meyraud705!)
Fixes https://github.com/libsdl-org/SDL/pull/6351
|
|
92b3c53c
|
2022-08-22T16:25:25
|
|
Added a hint SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE to control whether to use system mouse acceleration on raw relative motion.
This is currently only implemented on Windows, and "Enhanced pointer
precision" mode is not quite correct.
|
|
0e61c106
|
2022-08-22T12:49:41
|
|
Don't calculate relative mouse motion if we don't have a valid position
Fixes https://github.com/libsdl-org/SDL/issues/1928
|
|
f42291ce
|
2022-08-11T16:13:14
|
|
Don't change mouse capture based on touch events
Fixes https://github.com/libsdl-org/SDL/issues/5652
|
|
3861c557
|
2022-08-11T13:58:39
|
|
Added the hint SDL_HINT_MOUSE_RELATIVE_WARP_MOTION
This hint controls whether mouse warping generates motion events in relative mode, and defaults off.
Fixes https://github.com/libsdl-org/SDL/issues/6034
Fixes https://github.com/libsdl-org/SDL/issues/5741
|
|
0cd5b08b
|
2022-08-01T09:43:15
|
|
Fixed infinite loop when SDL_SendKeyboardText() is passed invalid UTF-8 text
|
|
cf63af8a
|
2022-07-31T22:10:45
|
|
events: Don't lose window RESIZED events during SIZED_CHANGED processing.
Previously, calling SDL_SendWindowEvent for a SIZED_CHANGED event would
filter the queue to remove RESIZED and SIZED_CHANGED events, so you don't
overflow the queue with obsolete data, but any RESIZED events would be
lost in this process.
Now we note if there was a RESIZED pending and replace it with a new
event using the same dimensions as the new SIZED_CHANGED event. This fixes
cases where an app is only listening for RESIZED events and thus might
lose important information in some cases.
Fixes #5925.
|
|
9515fb25
|
2022-07-31T16:10:10
|
|
keyboard: Use SDL_SetKeymap() to set the default keymap
This ensures the AZERTY workaround is applied for backends that
never call SDL_SetKeymap() themselves.
|
|
8b438f7b
|
2022-07-31T15:34:03
|
|
keyboard: Only send SDL_KEYMAPCHANGED when the keymap actually changes
|
|
1e492b2f
|
2022-07-25T10:12:53
|
|
Improve behavior of SDL_events_need_periodic_poll() and SDL_events_need_polling()
SDL_events_need_periodic_poll() and SDL_events_need_polling() are intended to allow the event loop to update joysticks and/or sensors if needed, however those systems only update when the SDL_update_joysticks and/or SDL_update_sensors variables are true. This change brings the behavior of these functions in line with if work will actually need to be performed.
This change allows the hints for AUTO_UPDATE to influence the polling behavior of the event loop such that an app can choose to update joysticks/sensors itself and avoid the expense of constantly sleeping and waking the event loop. Additionally in makes these functions marginally faster in some situations by not searching the active events.
|
|
d9bda89f
|
2022-07-25T10:03:36
|
|
Fix updating SDL_update_joysticks and SDL_update_sensors in response to hint changes
Hint callbacks are called before the actual value in the hint is changed, so the functions SDL_AutoUpdateJoysticksChanged and SDL_AutoUpdateSensorsChanged were not actually properly updating their respective variables in repsonse to their auto update hint changing.
Instead, we pull the new hint value out of the value passed into the callback and use that to update the variables. Assume true on a null value as that was the previous behavior and it matches with the default values of SDL_update_joysticks/SDL_update_sensors.
|
|
2373da5d
|
2022-07-11T09:49:00
|
|
Exposed SDL_ResetKeyboard() as a public function
This will be used by Source 2 titles to reset keyboard state before showing assertion dialogs
|
|
f317d619
|
2022-07-01T13:59:14
|
|
Xbox GDKX support (#5869)
* Xbox GDK support (14 squashed commits)
* Added basic keyboard testing
* Update readme
* Code review fixes
* Fixed issue where controller add/removal wasn't working (since the device notification events don't work on Xbox, have to use the joystick thread to poll XInput)
|
|
bdbf90e3
|
2022-07-01T09:17:30
|
|
on-screen keyboard newline is reported as an Enter key
|
|
7ac5d616
|
2022-07-01T08:58:08
|
|
Fixed backspace being delivered after committed text on Android 12
Testing:
Enter "hello ", followed by "?" - the events generated are:
: commitText hello
: Key pressed : scancode 11 = H, keycode 0x00000068 = H modifiers: (none)
: Key released: scancode 11 = H, keycode 0x00000068 = H modifiers: (none)
: Key pressed : scancode 8 = E, keycode 0x00000065 = E modifiers: (none)
: Key released: scancode 8 = E, keycode 0x00000065 = E modifiers: (none)
: Key pressed : scancode 15 = L, keycode 0x0000006C = L modifiers: (none)
: Key released: scancode 15 = L, keycode 0x0000006C = L modifiers: (none)
: Key pressed : scancode 15 = L, keycode 0x0000006C = L modifiers: (none)
: Key released: scancode 15 = L, keycode 0x0000006C = L modifiers: (none)
: Key pressed : scancode 18 = O, keycode 0x0000006F = O modifiers: (none)
: Key released: scancode 18 = O, keycode 0x0000006F = O modifiers: (none)
: Key pressed : scancode 44 = Space, keycode 0x00000020 = Space modifiers: (none)
: Key released: scancode 44 = Space, keycode 0x00000020 = Space modifiers: (none)
: INPUT Text (\x68\x65\x6c\x6c\x6f\x20): "hello "
: finishComposingText
: deleteSurroundingText 1 / 0
: Key pressed : scancode 42 = Backspace, keycode 0x00000008 = Backspace modifiers: (none)
: Key released: scancode 42 = Backspace, keycode 0x00000008 = Backspace modifiers: (none)
: commitText ?
: Key pressed : scancode 225 = Left Shift, keycode 0x400000E1 = Left Shift modifiers: LSHIFT
: Key pressed : scancode 56 = /, keycode 0x0000002F = / modifiers: (none)
: Key released: scancode 56 = /, keycode 0x0000002F = / modifiers: (none)
: Key released: scancode 225 = Left Shift, keycode 0x400000E1 = Left Shift modifiers: (none)
: INPUT Text (\x3f): "?"
: setComposingText , at 1
: EDIT Text (): ""
Previously, the backspace would be delivered after the "?"
|
|
78089e65
|
2022-07-01T13:08:31
|
|
Remove unused internal header SDL_sysevents.h
|
|
0ad65277
|
2022-06-29T17:26:09
|
|
Refactored code to send scancodes for an ASCII on-screen keyboard key
|
|
3b191580
|
2022-06-27T17:19:39
|
|
Windows GDK Support (#5830)
* Added GDK
* Simplfied checks in SDL_config_wingdk.h
* Added testgdk sample
* Added GDK readme
* Fixed error in merge of SDL_windows.h
* Additional GDK fixes
* OpenWatcom should not export _SDL_GDKGetTaskQueue
* Formatting fixes
* Moved initialization code into SDL_GDKRunApp
|
|
adc68758
|
2022-06-17T10:22:28
|
|
Added SDL_copyp to avoid size mismatch when copying values (thanks @1bsyl!)
Closes https://github.com/libsdl-org/SDL/pull/5811
|
|
81d3addd
|
2022-06-11T12:59:33
|
|
events: Fix spurious early returns from SDL_WaitEvent()/SDL_WaitEventTimeout()
Fixes #5780
|
|
5669743a
|
2022-05-19T09:45:57
|
|
Make sure SDL_CaptureMouse() is only called on the main thread
Windows handles mouse capture on a per-thread basis, and capture must be done on the thread used to create a window.
Fixes https://github.com/libsdl-org/SDL/issues/5577
|
|
501a4991
|
2022-05-05T18:44:32
|
|
Add clang-format on/off comments where necessary.
Comments were added in places where INDENT-ON/OFF comments are. Places
like stdlib's asm don't need it as clang-format doesn't try to indent it.
|
|
f9a9d3c8
|
2022-05-18T17:23:49
|
|
Also restore previous capture window if CaptureMouse() fails
|
|
7044452d
|
2022-05-18T17:15:10
|
|
Handle recursion in SDL_UpdateMouseCapture()
Fixes https://github.com/libsdl-org/SDL/pull/5608
|
|
e19a9a79
|
2022-05-18T15:29:59
|
|
Fixed a message box getting the mouse capture state out of sync
|
|
06aca7ed
|
2022-05-18T10:09:24
|
|
Fixed warping back into the window when gaining focus with warp relative mode enabled
|
|
b44241ab
|
2022-05-18T08:50:59
|
|
Don't send mouse events when warping in relative mode
This fixes games which set relative mode and then did mouse warping at the same time
Reference https://github.com/libsdl-org/SDL/issues/5609
|
|
2f924020
|
2022-05-05T20:12:07
|
|
Add SDL_SCANCODE_CALL and SDL_SCANCODE_ENDCALL
|
|
2bc37362
|
2022-05-05T13:31:26
|
|
Add SDL_SCANCODE_SOFTLEFT and SDL_SCANCODE_SOFTRIGHT
|
|
6150245d
|
2022-05-03T00:11:44
|
|
Add new verbosity level for logging of `SDL_SysWMEvent`s
Now logged only if SDL_HINT_EVENT_LOGGING is set to "3" or above.
|
|
fa073ed0
|
2022-04-22T22:31:04
|
|
Revert "Fix relative mouse input for Unvanquished (unvanquished.net)"
This reverts commit 331859079674465a39b24f32a6a113959601dca3.
Fixes https://github.com/libsdl-org/SDL/issues/5569
|
|
27fc582b
|
2022-04-05T15:11:49
|
|
Minor cleanup
|
|
86acb1a3
|
2022-04-05T15:05:07
|
|
Handle interaction between auto capture and the SDL_CaptureMouse() API
Fixes https://github.com/libsdl-org/SDL/issues/5457
|
|
96be9cdd
|
2022-03-27T21:48:09
|
|
Vita: add hint to select which touchpad generates mouse events
|
|
4fe7b2cb
|
2022-03-24T11:00:43
|
|
static analysis: Fixed several complaints from codechecker.
There are still some pending Objective-C specific issues.
Reference issue #4600.
|
|
f782abe5
|
2022-03-22T09:52:52
|
|
hints: Added SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE.
Fixes #2349.
|
|
5ff42438
|
2022-03-17T17:39:46
|
|
Added a hint to capture the mouse when mouse buttons are pressed, defaulting on
Fixes https://github.com/libsdl-org/SDL/issues/5301
|
|
09b8152f
|
2022-03-17T17:19:21
|
|
Use SDL_Log instead of printf
|
|
ecaa22cb
|
2022-03-17T14:22:51
|
|
Don't warn if anyone peeps for events after quitting the event subsystem
Fixes https://github.com/libsdl-org/SDL/issues/5013
|
|
33185907
|
2022-03-09T17:02:32
|
|
Fix relative mouse input for Unvanquished (unvanquished.net)
Here's an IRC dump that hopefully explains the issue this fixes:
> I'm debugging something odd where, for a libre game,
unvanquished.net (a FPS), relative mouse input in fullscreen is
buggy
> it's like, working mostly ok, but it has a weird
performance/cleanup bug
> after some time in relative mouse input mode, some time as low
as 15s, usually more, the SDL sends A LOT of relative mouse
input per frame
> almost all of which have xrel==0 && yrel==0
> by A LOT, I mean that after ~1min, it's usually in the
thousands per frame
> each frame, a while ( SDL_PollEvent( &e)) loop reads the
inputs, but it seems SDL is not clearing the list.
> one way to clear the list is to open the in-game console or
menu, which switches the input mode to absolute, then close it
which gets a working relative input mode (for some time at least)
> I've shown the issue to be present with SDL2.0.20 but not with
2.0.14 on my system
> some other players on Arch Linux (SDL2.0.20) report a possibly
related issue, where some keys seem to be pressed at random
> I've did some bisection on SDL master, and I've found that
there are actually two commits involved, one breaking it
totally (no input at all), and one fixing it partially (with
the problem described above)
First related commit that breaks it totally:
commit 82793ac279d19b5bde8fc2bd62877b05ba5a76e0
Author: Sam Lantinga <slouken@libsdl.org>
Date: Thu Oct 14 14:26:21 2021 -0700
Fixed mouse warping while in relative mode
We should get a mouse event with an absolute position and no relative motion and shouldn't change the OS cursor position at all
Second related commit, that halfway fixes it:
commit 31f8c3ef4409a93fafa894b78c2ce176bd0c3cf3
Author: Sam Lantinga <slouken@libsdl.org>
Date: Thu Jan 6 11:27:44 2022 -0800
Fixed event pump starvation if the application frequently pushes its own events
Reverting the first commit did fix the issue for me, but would
probably reintroduce the bug it was fixing(?). This patch should
fix it for everyone hopefully.
https://github.com/DaemonEngine/Daemon/issues/600 is the upstream
bug, and contains some early investigation.
|
|
cc152103
|
2022-03-17T11:37:08
|
|
Fixed warnings when building with cygwin
Fixes https://github.com/libsdl-org/SDL/issues/5025
|
|
d14a1263
|
2022-03-11T17:45:17
|
|
IME Composition Truncation + SDL_IsTextInputShown + SDL_ClearComposition (#5398)
* Fixes for IME Composition Truncation + Addition of SDL_ClearComposition, SDL_IsTextInputShown
* Fixed: Documentation and code style issues raised during code review.
|
|
b2463a91
|
2022-03-06T15:02:53
|
|
events: Add logging support for several missing event types
|
|
2e801b1a
|
2022-03-04T10:49:12
|
|
Split long text input into multiple events if needed (thanks @zreedy!)
|
|
6c531c43
|
2022-02-21T11:35:31
|
|
Correct handling of sentinel events when polling without removing events
Fixes https://github.com/libsdl-org/SDL/issues/5350
|
|
34d4f5b1
|
2022-02-08T11:32:20
|
|
Fixed bug #2032: add SDL_GetTouchName to expose the driver name of the device (Thanks @mgerhardy!)
|
|
e2f70a2d
|
2022-01-19T12:51:26
|
|
cleanup SDL_EventState
|
|
ebdd5366
|
2022-01-17T16:26:02
|
|
use SDL_InvalidParamError or SDL_assert instead of custom SDL_SetError
|
|
84320266
|
2022-01-25T12:37:43
|
|
Fixed the queue filling up with sentinel events when the WaitEvent call is passed NULL for the event
The use case is an application that waits for events on the main thread and dispatches them on a separate thread.
|
|
8f8b14cb
|
2022-01-21T17:10:09
|
|
Synthesize a missing touch-up event.
If a touch-down event is received for an existing touch-ID, that
probably means the operating system lost it, and that the missing
touch-up should be synthesized, to keep the client state coherent.
|
|
d8129c56
|
2022-01-10T10:50:59
|
|
Mark internal function as static
|
|
dca281e8
|
2022-01-08T08:49:34
|
|
Fixed getting different results for SDL_PollEvent(NULL) and SDL_PollEvent(&event)
|
|
289c3fbb
|
2022-01-07T17:07:22
|
|
Revert "We only need to add the sentinel at the top of SDL_WaitEventTimeout()"
This reverts commit c477768e6f926c38d4cdc236cab8376faf9f6789.
We want to add the sentinel anytime we pump inside SDL_WaitEventTimeout() to avoid pumping again the next time through, as a performance optimization.
|
|
c477768e
|
2022-01-06T18:58:30
|
|
We only need to add the sentinel at the top of SDL_WaitEventTimeout()
|
|
e9134b04
|
2022-01-06T19:38:10
|
|
events: Only add sentinels for pumping done inside SDL_WaitEventTimeout()
We don't want to catch explicit SDL_PumpEvents() calls by the application with
our polling check to avoid stale data. If the call to SDL_PumpEvents() produced
no events, there will be a sentinel sitting in the queue that will cause
SDL_PollEvent() to immediately return 0 next time it is called.
Our SDL_WaitEventTimeout() implementation avoids this issue by always popping
an event after calling SDL_PumpEvents(). This will remove the new sentinel if
we didn't get any new events.
|
|
95485884
|
2022-01-06T13:58:39
|
|
Move special sentinel handling inside SDL_PeepEvents()
|
|
2592e621
|
2022-01-06T13:30:26
|
|
Clarify that timeout == 0 is handled at the top of SDL_WaitEventTimeout()
|
|
8ff21668
|
2022-01-06T12:56:07
|
|
Only return from SDL_PollEvent() if the last sentinel is consumed
|
|
c9ff90b9
|
2022-01-06T12:03:09
|
|
Clarify comment
Co-authored-by: Simon McVittie <smcv@debian.org>
|
|
31f8c3ef
|
2022-01-06T11:27:44
|
|
Fixed event pump starvation if the application frequently pushes its own events
|
|
120c76c8
|
2022-01-03T09:40:00
|
|
Updated copyright for 2022
|
|
9ae56cb3
|
2021-12-06T21:18:23
|
|
events: Add logging for SDL_MOUSEWHEEL preciseX/Y fields
|
|
0445c13a
|
2021-11-22T16:49:17
|
|
Remove 'malloc' from comment
|
|
e72beeb2
|
2021-11-22T16:40:29
|
|
Remove 'malloc' from comment
|
|
d7d67af4
|
2021-11-14T17:52:41
|
|
mouse: Fix Y value in motion events when confinement is active
|
|
dfb834d3
|
2021-11-10T13:41:44
|
|
Track button state for each mouse input source separately
This way we'll get button down and up events for each mouseID
individually.
Fixes https://github.com/libsdl-org/SDL/issues/4518
|
|
fd79607e
|
2021-11-08T21:34:48
|
|
Added SDL_GetWindowMouseRect()
Also guarantee that we won't get mouse movement outside the confining area, even if the OS implementation allows it (e.g. macOS)
|
|
a3e8fd49
|
2021-11-08T09:58:11
|
|
Cancel any accumulated mouse wheel motion in the opposite direction when the wheel direction changes
Fixes https://github.com/libsdl-org/SDL/issues/2912
|
|
5dbbc8e6
|
2021-11-08T09:44:31
|
|
Added mouse wheel deltas with floating point precision
Fixes https://github.com/libsdl-org/SDL/issues/4888
|
|
f73376ae
|
2021-11-02T00:31:25
|
|
events: Add logging for SDL_CONTROLLERTOUCHPAD*, SDL_CONTROLLERSENSORUPDATE, and SDL_SENSORUPDATE events
|
|
a5598649
|
2021-10-30T19:30:34
|
|
x11/wayland: Fix signal handling while blocking in WaitEventTimeout()
Add a new flag to avoid suppressing EINTR in SDL_IOReady(). Pass the
flag in WaitEventTimeout() to ensure that a SIGINT will wake up
SDL_WaitEvent() without another event coming in.
|
|
ac54d57a
|
2021-10-26T20:02:38
|
|
event: Check subsystem initialization before events or devices
SDL_WasInit() is cheaper SDL_NumJoysticks()/SDL_NumSensors().
|
|
1bc6dc3e
|
2021-10-26T20:02:04
|
|
event: Cap maximum wait time if sensor or joystick subsystems are active
Joystick and sensor subsystems require periodic polling to detect new devices.
|
|
19dee1cd
|
2021-10-22T06:37:20
|
|
Add SDL_GetWindowICCProfile(). (#4314)
* Add SDL_GetWindowICCProfile
* Add new SDL display events
* Implement ICC profile change event for macOS
* Implement ICC profile notification for Windows
* Fix SDL_GetWindowICCProfile() for X11
* Fix compile errors
|
|
d5700ed2
|
2021-10-15T00:01:39
|
|
Don't log SDL_POLLSENTINEL, it's purely for internal bookkeeping
|
|
dd5d8950
|
2021-10-14T23:53:25
|
|
Fixed whitespace
|
|
8bf32e12
|
2021-10-15T06:26:10
|
|
Improved SDL_PollEvent usage (#4794)
* Avoid unnecessary SDL_PumpEvents calls in SDL_WaitEventTimeout
* Add a sentinel event to avoid infinite poll loops
* Move SDL_POLLSENTINEL to new internal event category
* Tweak documentation to indicate SDL_PumpEvents isn't always called
* Avoid shadowing event variable
* Ignore poll sentinel if more (user) events have been added after
Co-authored-by: Sam Lantinga <slouken@libsdl.org>
|
|
88e9f776
|
2021-10-14T18:37:27
|
|
Fixed relative mouse mode using warping after https://github.com/libsdl-org/SDL/commit/82793ac279d19b5bde8fc2bd62877b05ba5a76e0
|
|
82793ac2
|
2021-10-14T14:26:21
|
|
Fixed mouse warping while in relative mode
We should get a mouse event with an absolute position and no relative motion and shouldn't change the OS cursor position at all
|
|
1fa154fd
|
2021-10-13T09:33:54
|
|
Fix weak enforcement of timeouts in SDL_WaitEventTimeout_Device. This will loop pumping events and waiting for a system event to come in. However not all system events will turn into an SDL event. It's not unusual for a Windows message to be some internal thing that SDL doesn't convert into a message. In that case the loop will simple circle but not exit. As long as such messages are coming in the loop will continue to run regardless of the timeout. When messages finally stop it'll still wait for the full timeout so you can have arbitrarily long delays.
Instead do an absolute elapsed time check since the start of the wait. If that is exceeded during any iteration the routine exits as the timeout has elapsed.
|
|
1ec409c2
|
2021-10-06T09:09:09
|
|
Don't warp the mouse within a window while it's minimized
|
|
7ed415d2
|
2021-09-23T14:07:38
|
|
wayland: Reuse KeySymToUcs4 to replicate X11 keymap behavior
|
|
fbc36490
|
2021-08-14T22:29:05
|
|
Use the new SDL_clamp() macro where sensible
There were a few places throughout the SDL code where values were
clamped using SDL_min() and SDL_max(). Now that we have an SDL_clamp()
macro, use this instead.
|
|
69477151
|
2021-08-13T23:45:01
|
|
Get the window size for the window receiving the mouse motion
This is the mouse focus except in the case where relative motion is enabled and the mouse is over a window floating on top of the application window (e.g. the taskbar)
|
|
6a1e1ed9
|
2021-08-13T23:36:13
|
|
Relative mouse mode grab is based on the window with the input focus
This fixes restoring the cursor clip rectangle after the mouse has moved off of the window.
Also try to better synchronize cursor visibility with mouse position changes when changing relative mode. This doesn't work perfectly, but it seems to improve things on Windows.
|
|
b28ed028
|
2021-08-13T11:39:41
|
|
Don't warp the mouse for relative mode when the window doesn't have focus
|