summaryrefslogtreecommitdiffstats
path: root/platform/linuxbsd/wayland/display_server_wayland.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [DisplayServer] Add separate feature flags for different native dialog types.bruvzg2024-03-261-1/+3
|
* wayland: Stop unreachable warningAlistair Leslie-Hughes2024-03-091-2/+2
|
* Merge pull request #87452 from bruvzg/native_menuRémi Verschelde2024-03-061-0/+13
|\ | | | | | | Move `global_menu_*` methods to a separate `NativeMenu` class.
| * Move `global_menu_*` methods to a separate `NativeMenu` class.bruvzg2024-03-041-0/+13
| |
* | Wayland: Properly report all used featuresRiteo2024-03-041-3/+14
|/ | | | Oops, missed a few.
* Improve cursor_set_custom_image() methodkobewi2024-02-281-30/+3
|
* Wayland: suspend window after frame timeout or suspend stateRiteo2024-02-151-3/+28
| | | | | | | | | | | | | | | | | | | | | | 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.
* Add method to get "base" system UI color (macOS/Windows) and system theme ↵bruvzg2024-02-131-0/+4
| | | | change callback.
* Finish splitting functionality of the Vulkan and D3D12 backends into ↵Dario2024-02-121-27/+34
| | | | RenderingDeviceDriver.
* Merge pull request #87764 from Riteo/wayland-native-handleRémi Verschelde2024-01-311-0/+31
|\ | | | | Wayland: Implement `window_get_native_handle`
| * Wayland: implement `window_get_native_handle`Riteo2024-01-311-0/+31
| | | | | | | | | | This will be the most useful for stuff like OpenXR, although we'd need a way to eventually also expose the EGL handles.
* | [Wayland] Add support for native file dialogs.bruvzg2024-01-311-1/+21
|/
* Add Wayland supportRiteo2024-01-301-0/+1353
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.