src/video/wayland/SDL_waylandevents_c.h


Log

Author Commit Date CI Message
Ryan C. Gordon f600364b 2022-08-06T09:19:52 wayland: Mark window as MOUSE_CAPTURE while a mouse button is down. Wayland works like SDL's "auto capture" feature already, tracking the mouse globally only while a drag is occuring, and this is the only way to get mouse input outside the window. Setting this flag ourselves lets SDL_CaptureMouse() work in the most common use case without actually implementing CaptureMouse for the backend, including SDL's auto capture feature. Fixes #6010.
Ethan Lee 7a1c45bd 2022-03-25T12:51:38 wayland: Optimize keyboard_handle_modifiers. 1. Mod index values are (mostly) constant, so can be done with xkb_state_new 2. Mods can change without the group changing, avoid remap events if possible Lastly, as a bonus, I added braces to the locale check, because I was nearby.
Florian "sp1rit"​ 9125b244 2022-03-23T13:46:25 wayland: Basic support for zwp_tablet_*v2 protocol
Joan Bruguera 9e6249fa 2022-01-08T19:24:47 wayland: Avoid spurious key repeats when not pumping events Previous to this commit, key repeats events were typically generated when pumping events, based on the time of when the events are pumped. However, if an application doesn't call `SDL_PumpEvents` for some seconds, this time can be multiple seconds in the future compared to the actual key up event time, and generates key repeats even if a key was pressed only for an instant. In practice, this can happen when the user presses a key which causes the application to do something without pumping events (e.g. load a level). In Crispy Doom & PrBoom+, when the user presses the key bound to "Restart level/demo", the game doesn't pump events during the "screen melt" effect, and the level is restarted multiple times due to spurious repeats. To fix this, if the key up event is among the events to be pumped, we generate the key repeats there, since in the Wayland callback we receive the time when the key up event happened. Otherwise, we know no key up event happened and we can generate as many repeats as necessary after pumping. Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
Joan Bruguera 461724d2 2022-01-08T19:09:35 wayland: Refactor time fields in SDL_WaylandKeyboardRepeat Refactorization with no functional changes. Instead of `next_repeat_ms` containing a timestamp based on SDL ticks, we make it zero-based relative to the key press time, and we store the key press time in SDL ticks in a new field. This refactorization is groundwork for future commits which need to use the key press and release timestamps provided by the Wayland API, which are also expressed in milliseconds, but whose base does not match the one for SDL ticks. Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
Sam Lantinga 120c76c8 2022-01-03T09:40:00 Updated copyright for 2022
Ethan Lee ae67c7d2 2021-11-09T01:30:00 Implemented SDL_SetWindowMouseRect() on Wayland
Cameron Gutman 2bf36bfa 2021-10-24T21:28:04 wayland: Implement WaitEventTimeout() and SendWakeupEvent() We can have spurious wakeups in WaitEventTimeout() due to Wayland events that don't end up causing us to generate an SDL event. Fortunately for us, SDL_WaitEventTimeout_Device() handles this situation properly by calling WaitEventTimeout() again with an adjusted timeout.
Ethan Lee 74162b74 2021-07-29T13:27:31 wayland: Add support for text-input-unstable-v3
Luis Cáceres 5c78df9c 2021-04-14T00:56:50 Support key composing (i.e. dead keys) in Wayland driver (#4296) Based on an old patch by chw from the old Bugzilla issue tracker. Authored-by: chw Co-authored-by: Sam Lantinga <slouken@libsdl.org>
Ethan Lee 875f839d 2021-04-08T14:14:46 wayland: A bunch of clipboard safety fixes. Also removed Wayland_get_data_device because it was a pointless getter function.
Ethan Lee 7510245a 2021-04-08T14:08:35 wayland: Create the data_device only after both device_manager and input exist. There is no guarantee on what order the Wayland interfaces will come in, but the callbacks were assuming that wl_data_device_manager would could before wl_seat. This would cause certain desktops to not have any data_device to work with, meaning certain features like the clipboard would silently no-op.
Cameron Gutman 8c5b7af2 2021-02-25T19:30:47 Wayland: Fix mouse pointer hiding on Plasma Wayland Unlike Mutter and Sway, KWin actually checks the serial passed in wl_pointer_set_cursor(). The serial provided is supposed to be the serial of the pointer enter event, but We were always passing 0. This caused KWin to drop our requests to hide the cursor. Thanks to the KDE folks for spotting this in my debug logs. Fixes #3576
Cameron Gutman d789ba83 2021-01-19T18:20:07 Implement keyboard grab support for Wayland Use zwp_keyboard_shortcuts_inhibit_manager_v1 to allow SDL applications to capture system keyboard shortcuts like Alt+Tab when keyboard grab is enabled via SDL_HINT_GRAB_KEYBOARD.
Sam Lantinga 9130f7c3 2021-01-02T10:25:38 Updated copyright for 2021
Tudor Brindus 1a291ab1 2020-04-17T13:55:44 wayland: add support for SDL_SetWindowGrab
Ryan C. Gordon 02469877 2020-04-07T13:30:46 wayland: Support wayland compositors with wl_seat version < 5 (thanks, Nia!). Fixes Bugzilla #5074.
Sam Lantinga a8780c6a 2020-01-16T20:49:25 Updated copyright date for 2020
Sam Lantinga 5e13087b 2019-01-04T22:01:14 Updated copyright for 2019
Sam Lantinga e3cc5b2c 2018-01-03T10:03:25 Updated copyright for 2018
Sam Lantinga 0d011ec6 2017-08-28T00:22:23 Renaming of guard header names to quiet -Wreserved-id-macro
Sam Lantinga 45b774e3 2017-01-01T18:33:28 Updated copyright for 2017
Sam Lantinga d767a450 2016-11-06T08:34:27 Fixed 2942 - Wayland: Drag and Drop / Clipboard x414e54 I have implemented Drag and Drop and Clipboard support for Wayland. Drag and dropping files from nautilus to the testdropfile application seems to work and also copy and paste.
Sam Lantinga f11a4409 2016-09-01T01:26:56 wayland: Add support for relative mouse mode, by Jonas ?dahl <jadahl@gmail.com> Generate the C protocol files from the protocol XML files installed by wayland-protocols, and use them to implement support for relative pointer motions and pointer locking. Note that at the time, the protocol is unstable and may change in the future. Any future breaking changes will, however, fail gracefully and result in no regressions compared to before this patch.
Sam Lantinga 42065e78 2016-01-02T10:10:34 Updated copyright to 2016
Philipp Wiesemann 0e45984f 2015-06-21T17:33:46 Fixed crash if initialization of EGL failed but was tried again later. The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly uninitialized data structure if loading the library first failed. A later try to use EGL then skipped initialization and assumed it was previously successful because the data structure now already existed. This led to at least one crash in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was dereferenced to make a call to eglBindAPI().
Sam Lantinga 2c4a6ea0 2015-05-26T06:27:46 Updated the copyright year to 2015
Ryan C. Gordon b72938c8 2015-04-20T12:22:44 Windows: Always set the system timer resolution to 1ms by default. An existing hint lets apps that don't need the timer resolution changed avoid this, to save battery, etc, but this fixes several problems in timing, audio callbacks not firing fast enough, etc. Fixes Bugzilla #2944.
Alex Szpakowski fe6c797c 2015-04-10T23:30:31 Fixed an iOS view orientation issue when SDL_GL_CreateContext or SDL_CreateRenderer is called.
Edward Rudd b88ca1b4 2015-02-10T16:28:56 the last parameter of XChangeProperty is the number of elements.. and when the element format is 32.. the element is "long" so we have 5 long elements here. Yes this seems confusing as on mac+linux Long is either 32 or 64bits depending on the architecture, but this is how the X11 protocol is defined. Thus 5 is the correct value for the nelts here. Not 5 or 10 depending on the architecture. More info on the confusion https://bugs.freedesktop.org/show_bug.cgi?id=16802
Philipp Wiesemann b48e54aa 2015-01-26T22:00:29 Fixed bug 2802 - [patch] Fix android build compiling in wrong filesystem implementation Jonas Kulla The configure script didn't differentiate between Linux and Android, unconditionally compiling in the unix implementation of SDL_sysfilesystem.c. I'm probably one of the very few people building SDL for android using classic configure + standalone toolchain, so this has gone undetected all along.
David Ludwig 70438be2 2014-12-03T10:55:23 WinRT: fixed bug whereby SDL would override an app's default orientation WinRT apps can set a default, preferred orientation via a .appxmanifest file. SDL was overriding this on app startup, and making the app use all possible orientations (landscape and portrait). Thanks to Eric Wing for the heads up on this!
Philipp Wiesemann 9c398852 2014-11-22T22:20:40 Corrected header file documentation comment.
Pierre-Loup A. Griffais 24c86b55 2014-09-11T19:24:42 [X11] Reconcile logical keyboard state with physical state on FocusIn since the window system doesn't do it for us like other platforms. This prevents sticky keys and missed keys when going in and out of focus, for example Alt would appear to stick if switching away from an SDL app with Alt-Tab and had to be pressed again. CR: Sam
David Ludwig 3dcb451f 2014-04-09T21:29:19 Added a README file regarding WinRT support To note, this file is currently formatted with CRLF line endings, rather than LF, to allow the file to be viewed with Notepad.
Sam Lantinga 58edac3e 2014-02-02T00:53:27 Fixed bug 2374 - Update copyright for 2014... Is it that time already??
Gabriel Jacobo 272ebb8e 2014-01-09T13:56:21 Dynamic loading support for Wayland
Gabriel Jacobo ec1cb49e 2013-12-14T20:18:43 Wayland support Based on the original port to Wayland by: Joel Teichroeb, Benjamin Franzke, Scott Moreau, et al. Additional changes in this commit, done by me: * Wayland uses the common EGL framework * EGL can now create a desktop OpenGL context * testgl2 loads GL functions dynamically, no need to link to libGL anymore * Assorted fixes to the Wayland backend Tested on the Weston Compositor (v1.0.5) that ships with Ubuntu 13.10, running Weston under X. Tests ran: testrendercopyex (all backends), testgl2, testgles2,testintersections