summaryrefslogtreecommitdiffstats
path: root/platform/linuxbsd/wayland/wayland_thread.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Wayland: suspend window after frame timeout or suspend stateRiteo2024-02-151-5/+111
| | | | | | | | | | | | | | | | | | | | | | This is a pretty popular approach that took a while for me to wrap my head around and which only recently got "official" support through an update (xdg_shell version 6), so I think that this is all-in-all a better option than the overkill 2000Hz ticking we have now :P Basically, we wait for a frame event and, if either too much time passes or we get the new `suspended` state, we consider the window as "hidden" and stop drawing, ticking by the low usage rate. This should work great for KDE and Mutter, which support the new state, but not yet for sway, which is still stuck at a very old xdg_shell version and thus falls back to the timeout approach. Be aware that if we rely on timing out the engine will have to stall for the whole timeout, which _could_ be problematic but doensn't seem like it. Further testing is needed. Special thanks go to the guys over at #wayland on OFTC, who very patiently explained me this approach way too many times.
* Merge pull request #82800 from Sauermann/fix-screen-mousemotionRémi Verschelde2024-02-091-0/+4
|\ | | | | | | Add screen-related attributes to mouse input events
| * Add screen-related attributes to mouse input eventsMarkus Sauermann2024-02-051-0/+4
| |
* | wayland: Update to 1.22.0Jakub Marcowski2024-02-061-0/+12
|/
* [Wayland] Add support for native file dialogs.bruvzg2024-01-311-0/+33
|
* Add Wayland supportRiteo2024-01-301-0/+4004
Not everything is yet implemented, either for Godot or personal limitations (I don't have all hardware in the world). A brief list of the most important issues follows: - Single-window only: the `DisplayServer` API doesn't expose enough information for properly creating XDG shell windows. - Very dumb rendering loop: this is very complicated, just know that the low consumption mode is forced to 2000 Hz and some clever hacks are in place to overcome a specific Wayland limitation. This will be improved to the extent possible both downstream and upstream. - Features to implement yet: IME, touch input, native file dialog, drawing tablet (commented out due to a refactor), screen recording. - Mouse passthrough can't be implement through a poly API, we need a rect-based one. - The cursor doesn't yet support fractional scaling. - Auto scale is rounded up when using fractional scaling as we don't have a per-window scale query API (basically we need `DisplayServer::window_get_scale`). - Building with `x11=no wayland=yes opengl=yes openxr=yes` fails. This also adds a new project property and editor setting for selecting the default DisplayServer to start, to allow this backend to start first in exported projects (X11 is still the default for now). The editor setting always overrides the project setting. Special thanks to Drew Devault, toger5, Sebastian Krzyszkowiak, Leandro Benedet Garcia, Subhransu, Yury Zhuravlev and Mara Huldra.