src/video/wayland/SDL_waylandwindow.h


Log

Author Commit Date CI Message
Väinö Mäkelä ad520573 2021-10-06T09:52:06 wayland: Only dispatch frame events in Wayland_GLES_SwapWindow Dispatching all events in Wayland_GLES_SwapWindow leads to resizes being acked before the program has a chance to handle the resize. This change reduces jumping on fullscreen transition with apps that call SDL_PollEvent before issuing any render calls.
Sebastian Krzyszkowiak b4c4060a 2021-08-02T04:52:25 wayland: Clean up Wayland_HandlePendingResize Commit 871c11191bfc7214061a3da37c112522a102ddf5 removed delayed resize handling, but it left the whole structure untouched that now became unnecessary. To help with code clarity, get rid of the structure where pending resize state used to be stored and pass all the data directly to Wayland_HandlePendingResize (now renamed to Wayland_HandleResize, since it's not "pending" anymore but applied immediately)
Christian Rauch 42452f8c 2021-08-01T13:51:30 wayland: store and restore floating states Some Wayland compositors send (0,0) as "suggested" configure event sizes to indicate that the client has to decide on its own which sizes to used. This is commonly done when restoring from maximised, fullscreen or tiles states to fullscreen. We now store the last known floating states in a new set of variables and restore them when we receive such a (0,0) configure event.
Ethan Lee 03185e74 2021-07-27T18:35:00 wayland: Tag/Check wl_output objects as well, fixes crashes when libdecor is in use
Ryan C. Gordon 871c1119 2021-07-27T18:24:09 wayland: handle pending resizes immediately, not on SwapWindow. This was originally a workaround for an old Mesa bug, since fixed, apparently, and causes other problems. Fixes #4326.
Ethan Lee a3eb297e 2021-07-27T17:17:19 wayland: Rework enter/leave and update_scale_factor to avoid bogus wl_output data. Also remove get_window_scale_factor() which was just pointless indirection.
Simon Zeni 6aae5b44 2021-07-27T17:12:26 Remove wl-shell and xdg-shell-unstable-v6 support (#4323) * wayland-protocol: update wayland.xml to 1.19.0 * wayland: remove shell_surface field from SDL_SysWMinfo * wayland: remove wl_shell support * waypand-protocols: update xdg-shell.xml to 1.20 * wayland: remove xdg-shell-unstable-v6 support * wayland: deprecate wl shell surface syswm info, add xdg surface
Christian Rauch 9e6fcbe7 2020-06-11T22:10:28 wayland: client-side decoration
Sam Lantinga f1633127 2021-07-24T13:41:55 Added a window flash operation to be explicit about window flash behavior
Sam Lantinga e1c3a250 2021-07-24T12:11:27 Changed SDL_FlashWindow() so it doesn't take a flash count, and added the hint SDL_HINT_WINDOW_FLASH_COUNT to control behavior on Windows
Ethan Lee d956636c 2021-06-04T18:39:47 wayland: Implement FlashWindow
Ethan Lee 151f9538 2021-06-02T11:41:44 wayland: Implement RaiseWindow with xdg-activation
Christian Rauch 424bbaec 2021-05-01T18:53:12 wayland: destroy frame callback when window is destroyed
Ryan C. Gordon c54c16d3 2021-04-30T13:19:36 wayland: don't hang in SDL_GL_SwapBuffers if the compositor is ghosting us. If you hide a window on Mutter, for example, the compositor never requests new frames, which will cause Mesa to block forever in eglSwapBuffers to satisfy the swap interval. We now always set the swap interval to 0 and manage this ourselves, handing the frame to Wayland when it requests a new one, and timing out at 10fps just to keep apps moving if the compositor wants no frames at all. My understanding is that other protocols are coming that might improve upon this solution, but for now it solves the total hang. Fixes #4335.
Ethan Lee 8e3ec34d 2021-04-20T12:40:40 wayland: Refactor toplevel mapping, implement HideWindow
Ethan Lee fcbfe33c 2021-04-18T09:45:22 wayland: Implement SetWindowModalFor
David Edmundson f6a09ef1 2021-04-07T16:16:23 wayland: Drop support for kwin specific decoration management KWin has supported the shared and formalised zxdg_decoration since Plasma 5.16 which came out mid 2019. Whilst it made sense to support them both for a while, it should not be needed for future SDL releases.
Ethan Lee 57a927e8 2021-02-12T14:27:58 wayland: Explicitly set min/max size for xdg-shell
Cameron Gutman a0d3c6c6 2021-01-25T21:42:14 Rename SetWindowGrab() to SetWindowMouseGrab()
Cameron Gutman e1f73e64 2021-01-23T16:22:44 Refactor keyboard grab to be managed by the video core This gives us flexibility to add others hints to control keyboard grab behavior without having to touch all of the backends. It also allows us to possibly expose keyboard grab separately from mouse grab for applications that want to manage those independently.
Ethan Lee e787282b 2021-01-23T15:40:22 Implement Wayland_SetWindowResizable
Cameron Gutman bd553ea8 2021-01-20T21:17:20 Implement support for inhibiting the screensaver on Wayland We support both the org.freedesktop.ScreenSaver D-Bus API (same as the X11 backend) and the Wayland idle_inhibit_unstable_v1 protocol. Some Wayland compositors only support one or the other, so we need both to for broad compatibility.
Cameron Gutman 19236b46 2021-01-21T21:49:13 Implement support for minimizing windows on Wayland This required a bit of extra code to deal with the transition from minimized back to fullscreen
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 a77a890d 2020-02-14T00:58:36 wayland: Don't delay pending surface resize handling on Vulkan. OpenGL apparently needs to not do any drawing between wl_egl_window_resize and eglSwapBuffers, but Vulkan apps don't use SDL to present, so they never call into an equivalent of SDL_GL_SwapWindow where our Wayland code was handling pending resize work. Fixes Bugzilla #4722.
Sam Lantinga a8780c6a 2020-01-16T20:49:25 Updated copyright date for 2020
Sebastian Krzyszkowiak 797b2813 2019-06-12T00:55:05 wayland: HiDPI support
Sylvain Becker b8e5c561 2019-04-02T17:07:54 Bug 4576: remove touch/mouse duplication for Wayland
Sam Lantinga 5e13087b 2019-01-04T22:01:14 Updated copyright for 2019
Ryan C. Gordon bd3ee07c 2018-12-05T16:49:38 wayland: Send SDL_TOUCH_MOUSEID mouse events for touches.
Sebastian Krzyszkowiak 48917e0e 2018-11-07T01:08:35 wayland: fix resizing and fullscreen toggling For starters, we need to correctly respond to 0,0 configure after unsetting fullscreen. Also, turns out that there should be no drawing calls at all in between eglSwapBuffers and wl_egl_window_resize, as otherwise EGL can already allocate a wrongly sized buffer for a next frame, so handle those together.
Sebastian Krzyszkowiak 5f980514 2018-11-04T21:08:40 wayland: ask xdg-decoration protocol extension to use server-side decorations if possible.
Ryan C. Gordon a5ebd4d7 2018-10-29T10:14:59 wayland: ask KDE protocol extension to use server-side decorations if possible.
Ryan C. Gordon c8ac9096 2018-06-24T22:42:36 wayland: Implemented xdg-wm-base support. This is just in parity with the existing zxdg-shell-unstable-v6 code. Making the Wayland target robust (and uh, with title bars) is going to take a lot of work on top of this.
Ryan C. Gordon 2df59062 2018-04-15T17:42:09 wayland: zxdg_shell_v6 needs a configure event before using a surface at all. Fixes Bugzilla #4109. Fixes Bugzilla #4119.
Ryan C. Gordon cd532207 2018-02-07T13:13:55 wayland: Add support for xdg-shell protocol (unstable v6). This is meant to be the desktop-enhanced version of wl_shell. Right now we just match what the existing wl_shell code does, but there are other areas of functionality available to us now, that we can fill in later. This uses the "unstable" API, since this is what ships in Ubuntu 17.10 (as part of Wayland 1.10), but Wayland 1.12 promotes this to stable with extremely minor changes. We will add support for the stable version when it makes sense to do so.
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 eea76fc1 2016-10-07T18:11:03 Fixed bug 3063 - Wayland: SDL resizes EGL surface to 0x0. x414e54 Wayland will sometimes send empty resize events (0 width and 0 height) to the client. I have not worked out the exact conditions a client would receive these but I can assume it might be if the window is offscreen or not mapped yet. This causes issues with some SDL clients as they receive the 0x0 event and unexpected resize event or might not request to resize back to the correct size. As per the wl_shell Wayland spec configure events are only a suggestion and the client is free to ignore or pick a different size (this is how min/max and fixed aspect ratio is supped to be implemented). A patch is attached but is just the first iteration and I will fix any issues such as checking for FULLSCREEN/MAXIMIZED or RESIZABLE flags unless someone else fixes this first. I have update to take into account non resizable and fullscreen windows. Also adding in maximize/restore and title functions for Wayland.
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.
Ryan C. Gordon d10201be 2015-04-12T20:40:06 Implemented SetWindowHitTest() for Wayland (thanks, x414e54!). Fixes Bugzilla #2941.
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 fce6257c 2013-12-27T09:29:39 Implements touch support on QTWayland. Contributed by Thomas Perl.
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