Branch :
| Author | Commit | Date | CI | Message |
|---|---|---|---|---|
| 96be9cdd | 2022-03-27 21:48:09 | Vita: add hint to select which touchpad generates mouse events | ||
| 4fe7b2cb | 2022-03-24 11:00:43 | static analysis: Fixed several complaints from codechecker. There are still some pending Objective-C specific issues. Reference issue #4600. | ||
| f782abe5 | 2022-03-22 09:52:52 | hints: Added SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE. Fixes #2349. | ||
| 5ff42438 | 2022-03-17 17: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-17 17:19:21 | Use SDL_Log instead of printf | ||
| ecaa22cb | 2022-03-17 14: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-09 17: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-17 11:37:08 | Fixed warnings when building with cygwin Fixes https://github.com/libsdl-org/SDL/issues/5025 | ||
| d14a1263 | 2022-03-11 17: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-06 15:02:53 | events: Add logging support for several missing event types | ||
| 2e801b1a | 2022-03-04 10:49:12 | Split long text input into multiple events if needed (thanks @zreedy!) | ||
| 6c531c43 | 2022-02-21 11:35:31 | Correct handling of sentinel events when polling without removing events Fixes https://github.com/libsdl-org/SDL/issues/5350 | ||
| 34d4f5b1 | 2022-02-08 11:32:20 | Fixed bug #2032: add SDL_GetTouchName to expose the driver name of the device (Thanks @mgerhardy!) | ||
| e2f70a2d | 2022-01-19 12:51:26 | cleanup SDL_EventState | ||
| ebdd5366 | 2022-01-17 16:26:02 | use SDL_InvalidParamError or SDL_assert instead of custom SDL_SetError | ||
| 84320266 | 2022-01-25 12: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-21 17: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-10 10:50:59 | Mark internal function as static | ||
| dca281e8 | 2022-01-08 08:49:34 | Fixed getting different results for SDL_PollEvent(NULL) and SDL_PollEvent(&event) | ||
| 289c3fbb | 2022-01-07 17: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-06 18:58:30 | We only need to add the sentinel at the top of SDL_WaitEventTimeout() | ||
| e9134b04 | 2022-01-06 19: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-06 13:58:39 | Move special sentinel handling inside SDL_PeepEvents() | ||
| 2592e621 | 2022-01-06 13:30:26 | Clarify that timeout == 0 is handled at the top of SDL_WaitEventTimeout() | ||
| 8ff21668 | 2022-01-06 12:56:07 | Only return from SDL_PollEvent() if the last sentinel is consumed | ||
| c9ff90b9 | 2022-01-06 12:03:09 | Clarify comment Co-authored-by: Simon McVittie <smcv@debian.org> | ||
| 31f8c3ef | 2022-01-06 11:27:44 | Fixed event pump starvation if the application frequently pushes its own events | ||
| 120c76c8 | 2022-01-03 09:40:00 | Updated copyright for 2022 | ||
| 9ae56cb3 | 2021-12-06 21:18:23 | events: Add logging for SDL_MOUSEWHEEL preciseX/Y fields | ||
| 0445c13a | 2021-11-22 16:49:17 | Remove 'malloc' from comment | ||
| e72beeb2 | 2021-11-22 16:40:29 | Remove 'malloc' from comment | ||
| d7d67af4 | 2021-11-14 17:52:41 | mouse: Fix Y value in motion events when confinement is active | ||
| dfb834d3 | 2021-11-10 13: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-08 21: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-08 09: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-08 09:44:31 | Added mouse wheel deltas with floating point precision Fixes https://github.com/libsdl-org/SDL/issues/4888 | ||
| f73376ae | 2021-11-02 00:31:25 | events: Add logging for SDL_CONTROLLERTOUCHPAD*, SDL_CONTROLLERSENSORUPDATE, and SDL_SENSORUPDATE events | ||
| a5598649 | 2021-10-30 19: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-26 20:02:38 | event: Check subsystem initialization before events or devices SDL_WasInit() is cheaper SDL_NumJoysticks()/SDL_NumSensors(). | ||
| 1bc6dc3e | 2021-10-26 20: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-22 06: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-15 00:01:39 | Don't log SDL_POLLSENTINEL, it's purely for internal bookkeeping | ||
| dd5d8950 | 2021-10-14 23:53:25 | Fixed whitespace | ||
| 8bf32e12 | 2021-10-15 06: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-14 18:37:27 | Fixed relative mouse mode using warping after https://github.com/libsdl-org/SDL/commit/82793ac279d19b5bde8fc2bd62877b05ba5a76e0 | ||
| 82793ac2 | 2021-10-14 14: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-13 09: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-06 09:09:09 | Don't warp the mouse within a window while it's minimized | ||
| 7ed415d2 | 2021-09-23 14:07:38 | wayland: Reuse KeySymToUcs4 to replicate X11 keymap behavior | ||
| fbc36490 | 2021-08-14 22: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-13 23: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-13 23: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-13 11:39:41 | Don't warp the mouse for relative mode when the window doesn't have focus | ||
| cb1e20b0 | 2021-08-10 17:50:17 | Added KMOD_SCROLL to track the scroll lock state Fixes https://github.com/libsdl-org/SDL/issues/4566 | ||
| 8fb95034 | 2021-04-02 12:52:21 | Avoid warping the cursor to the center of the window when not in relative_warp_mode When relative mode is enabled and not using warp mode, the cursor is being clipped to the window. Therefore there is no reason to restore the cursor position to the center. Avoiding the warp to center simplifies mouse position event flow, as we are no longer potentially receiving mouse events for the automated movement of the cursor and can be (mostly) assured that an incoming event from the windowing system is that of external means. | ||
| 7948c16d | 2021-06-12 17:56:52 | Pump events each time through the loop in SDL_WaitEventTimeout_Device() Not only is it more efficient to batch process pending events, it is necessary for correctness with the Win32 backend. WIN_PumpEvents() runs periodic updates of the cursor clip region and disambiguation of left and right shift keys in addition to standard event processing. | ||
| 105de64c | 2021-06-12 16:19:03 | Only queue one wakeup event per wait Queuing more than one can lead to a spurious wakeup on the next wait. | ||
| d28437de | 2021-06-12 08:00:50 | SDL_keyboard.c: Add bounds guards when assigning to the scancode array. Based on a patch by Jochen Schäfer <josch1710@live.de> : On a T420 pressing the ACPI button for volume control, big scancodes were emitted. This was causing an overflow, because missing guards. | ||
| e13b43ac | 2021-06-05 12:44:08 | Don't skip sending wakeups for the current thread We can be in a situation where we receive a win32 hook callback on the same thread that is currently waiting. In that case, we do still need to trigger a wakeup when an event is pushed because the hook itself won't necessarily do that (depending on what we return from the hook). | ||
| b992b915 | 2021-06-05 11:57:30 | Optimize SDL_WaitEventTimeout() for the SDL_PollEvent() case There's no sense in doing all the setup for waiting if we're just polling. | ||
| 85b51e6c | 2021-06-05 11:46:47 | Fall back to polling normally if not operating the win32 message loop In this condition, we cannot safely wait/wake on events. | ||
| e13d5df0 | 2021-06-05 11:41:55 | Call SDL_SendWakeupEvent() directly from SDL_PeepEvent() SDL_PeepEvent() is a documented public API, so we must properly support waking a waiting thread in SDL_WaitEventTimeout() with SDL_PeepEvent(). | ||
| 0dd7024d | 2021-03-12 21:58:20 | Modifies WaitEvent and WaitEventTimeout to actually wait instead of polling When possible use native os functions to make a blocking call waiting for an incoming event. Previous behavior was to continuously poll the event queue with a small delay between each poll. The blocking call uses a new optional video driver event, WaitEventTimeout, if available. It is called only if an window already shown is available. If present the window is designated using the variable wakeup_window to receive a wakeup event if needed. The WaitEventTimeout function accept a timeout parameter. If positive the call will wait for an event or return if the timeout expired without any event. If the timeout is zero it will implement a polling behavior. If the timeout is negative the function will block indefinetely waiting for an event. To let the main thread sees events sent form a different thread a "wake-up" signal is sent to the main thread if the main thread is in a blocking state. The wake-up event is sent to the designated wakeup_window if present. The wake-up event is sent only if the PushEvent call is coming from a different thread. Before sending the wake-up event the ID of the thread making the blocking call is saved using the variable blocking_thread_id and it is compared to the current thread's id to decide if the wake-up event should be sent. Two new optional video device methods are introduced: WaitEventTimeout SendWakeupEvent in addition the mutex wakeup_lock which is defined and initialized but only for the drivers supporting the methods above. If the methods are not present the system behaves as previously performing a periodic polling of the events queue. The blocking call is disabled if a joystick or sensor is detected and falls back to previous behavior. | ||
| 07fc1bb8 | 2021-03-15 15:10:49 | Fix invalid UTF-8 handling of extra bytes | ||
| 79cd8cab | 2021-01-27 20:41:36 | Add default handler for Alt+Tab while keyboard grab is enabled By default, we will minimize the window when we receive Alt+Tab with a full-screen keyboard grabbed window to allow the user to escape the full-screen application. Some applications like remote desktop clients may want to handle Alt+Tab themselves, so provide an opt-out via SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED=0. | ||
| 68815b6c | 2021-01-10 22:21:12 | Fixed bug 5465 - Invalid memcpy inside SDL_GestureDelTouch (Thanks dmikushin and Yuki Okumura) | ||
| 9130f7c3 | 2021-01-02 10:25:38 | Updated copyright for 2021 | ||
| 5f7cd1fa | 2020-12-18 10:08:59 | Added hints to control whether SDL updates joystick and sensor state in the main event loop | ||
| cb361896 | 2020-12-09 07:16:22 | Fixed bug 5235 - All internal sources should include SDL_assert.h Ryan C. Gordon We should really stick this in SDL_internal.h or something so it's always available. | ||
| d2723875 | 2020-10-14 23:01:06 | os2: integrate the port into main tree. | ||
| bcbaa4ec | 2020-05-26 16:34:50 | If there isn't a GetGlobalMouseState() implementation, fall back to the normal one. | ||
| fa23e3d0 | 2020-05-04 02:27:29 | locale: Implemented SDL_GetPreferredLocales(). This was something I proposed a long time ago, Sylvain Becker did additional work on it, then back to me. Fixes Bugzilla #2131. | ||
| d4f1b520 | 2020-04-08 19:16:31 | Added support for press/release hardware keyboard events in iOS 13.4 | ||
| 1f4965c8 | 2020-03-08 21:24:06 | Fixed warnings building with mingw64 | ||
| 997f3e9e | 2020-03-02 09:03:55 | Fixed build warnings | ||
| b5849daf | 2020-02-01 09:23:04 | Fixed build warnings on Android | ||
| a8780c6a | 2020-01-16 20:49:25 | Updated copyright date for 2020 | ||
| dd7fe0af | 2019-11-16 22:45:49 | Fixed bug 4814 - Missing scancodes on Linux Michael Roe The mappings for keyboard scancodes on Linux do not include keypad left and right parentheses (used on some Microsoft keyboard), keypad plus/minus, LANG1 and LANG2 (used on Korean keyboards), XK86MenuKB, and F20 (remapped to Audio Mic Mute in the usual X11 config). | ||
| cf33f1f0 | 2019-11-13 21:53:01 | Added a utility function to simplify the hint handling logic | ||
| b458d7a2 | 2019-10-30 15:13:55 | Readability: remove redundant cast to the same type | ||
| 526b9bdf | 2019-10-14 22:41:27 | Backed out changeset b0241180cdc5 Better commit incoming! | ||
| cd8652d8 | 2019-10-15 01:13:44 | events: SDL_WaitEvent()'s polling loop now sleeps 1ms instead of 10ms. Fixes Bugzilla #4356. | ||
| cf092eca | 2019-10-09 13:42:13 | mouse: Save initial position yet even if xrel and yrel are 0. The X11 target sets mouse->last_x and last_y in EnterNotify and then calls SDL_SendMouseMotion(), which throws away the new position because it matches the mouse->last_x and last_y we just set, meaning that if the pointer is in the window when it created, SDL_GetMouseState() will report a position of 0,0 until a MotionNotify event (the pointer moves) arrives and corrects the mouse state. Mostly fixes Bugzilla #1612. | ||
| 70dc8d16 | 2019-08-30 08:55:20 | Android: fix corresponding warnings | ||
| 2cb26188 | 2019-08-24 20:40:37 | Fixed bug 1663 - SDL_EventState(SDL_DOLLARGESTURE,SDL_IGNORE) etc. has no effect | ||
| 2937317f | 2019-08-22 10:15:33 | Fixed bug 4172 - remove logging Gesture error "NumPoints = 0" - not necessary when app isn't recording gesture. - happen when gesture path has less than 2 different points | ||
| d5ec735a | 2019-08-01 18:22:12 | Add a windowID field to SDL_TouchFingerEvent (bug #4331). This is unimplemented on some platforms and will cause compile errors when building those platform backends for now. | ||
| e7c2cf10 | 2019-07-15 09:36:53 | Fixed bug 4704 - SDL_HINT_ANDROID_SEPERATE_MOUSE_AND_TOUCH on Windows? superfury I notice that, somehow, when locking the mouse into place(using SDL_SetRelativeMouseMode), somehow at least the movement information gets through to both mouse movement and touch movement events? My app handles both, so when moving a touched finger accross the app(using RDP from an Android device) I see the mouse moving inside the app when it shouldn't(meaning that the touch movement is ignored properly by the app(press-location dependant) but the mouse movement is still performed due to the mouse movement events)? | ||
| 66252035 | 2019-07-09 11:46:42 | SDL_Mouse/Touch: discard synthetic events when hints are not set. Those are generated/flagged by platform layer. | ||
| e841b066 | 2019-07-08 13:41:01 | cocoa: Another attempt at mouse vs touch support. This time, we make anything we think is a MacBook trackpad report its touches as SDL_MOUSE_TOUCHID, even though they're not _actually_ synthesized events, and let all mouse input--even if the OS synthesized it from a multitouch trackpad on our behalf--look like physical input. This is backwards from reality, but produces the results most apps will expect. Note that if you have a real touch device that doesn't appear to be the trackpad, it'll produce real touch events with unique device ids, so it's not a total loss here, but also note that the way we decide if it was the trackpad is an imperfect heuristic; it happens to work out right now, but it's not impossible that a real touchscreen could come to the Mac at some point and (incorrectly?) call it a "mouse" input, etc. But for now, good enough. Fixes Bugzilla #4690. | ||
| f3226457 | 2019-06-19 17:11:20 | Fixed bug 4672 - Warnings in SDL_LogEvent() | ||
| 8ab907ba | 2019-06-18 14:24:26 | Only warp the mouse to set focus if we're definitely going into relative mode | ||
| 9306ef9b | 2019-06-16 14:10:30 | Fix synthetically generated mouse events getting lost forever after the device orientation changes (or the window is otherwise resized) while a finger is touching the screen. | ||
| d9a2eff2 | 2019-06-13 21:31:03 | cocoa: Another attempt at synthesized mouse/touch events. | ||
| 29457464 | 2019-06-13 01:57:13 | cocoa: Revised synthesized mouse/touch event strategy. I _think_ I understand what Sylvain is working on here now, so hopefully I got this right. Fixes Bugzilla #4576. (I think!) | ||
| e401b950 | 2019-05-23 11:32:36 | Return an error if both mouse relative mode and mouse warping are unavailable, instead of asserting. | ||
| 62a57970 | 2019-05-15 14:01:15 | Windows are not in a minimized state when they are shown This fixes https://github.com/ValveSoftware/steam-for-linux/issues/4313 "Exiting game a in Steam Big Picture Mode gets semi-windowed BPM" | ||
| aae49015 | 2019-04-10 10:59:53 | Fixed bug 4581 - generate synthetic mouse events at window boundaries when real touch events are actually outside the window. | ||
| cfefe543 | 2019-04-08 21:27:24 | Fixed bug 4581 - mouse events with SDL_TOUCH_MOUSEID make window lost focus Virtual mouse events should never leave the window or change focus for single window applications. | ||
| eb7affee | 2019-04-06 21:52:51 | SDL_HINT_MOUSE_TOUCH_EVENTS: move tracking appart in case of 'window' is null |