summaryrefslogtreecommitdiffstats
path: root/platform/linuxbsd/wayland
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge pull request #92353 from Riteo/you-cant-see-meRémi Verschelde2024-05-282-0/+11
|\ \ | | | | | | | | | Wayland: Implement `is_window_transparency_available`
| * | Wayland: Implement is_window_transparency_availableRiteo2024-05-262-0/+11
| |/
* / Enable build config wayland=yes use_sowrap=noJoel Winarske2024-05-251-0/+3
|/ | | | | | -wayland-egl.h was missing if opengl3=yes (default) Signed-off-by: Joel Winarske <joel.winarske@gmail.com>
* Properly set window class in WaylandPaulo Poiati2024-05-222-5/+6
|
* Merge pull request #89574 from Riteo/scale-your-expectations-with-this-oneRémi Verschelde2024-05-071-1/+9
|\ | | | | | | Wayland: Workaround API limitation in screen/UI scale logic
| * Wayland: Workaround API limitation in screen/UI scale logicRiteo2024-05-071-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Mainly, this fixes auto UI scaling with _single-monitor_ fractional setups (see the comment in `display_server_wayland.cpp` for more info). This is the result of a bunch of current limitations, mainly the fact that the UI scale is static (it's probed at startup) and the fact that Wayland exposes fractional scales only at the window-level, by design. The `screen_get_scale` special case should help in 99% of cases, while the auto UI scale part will unfortunately only help with single-screen situations, as multi-screen fractional scaling requires dynamic UI scale changing.
* | Reduce and prevent unnecessary random-access to `List`A Thousand Ships2024-05-041-1/+1
|/ | | | | | | | | Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when accessing a single element) * Removed subscript operator, in favor of a more explicit `get` * Added conversion from `Iterator` to `ConstIterator` * Remade existing operations into other solutions when applicable
* Wayland: Add support for OpenGL ES driverRiteo2024-05-035-18/+161
| | | | | Everything was already there, we just had to wire it up in the display server.
* [Core] Add scalar versions of `Vector*` `min/max/clamp/snap(ped)`A Thousand Ships2024-05-021-1/+1
| | | | Convenience for a number of cases operating on single values
* Wayland: Improve compositor compatibility by allowing older globalsRiteo2024-04-262-119/+136
| | | | | | | | | | | | | | | | | | Previously we pretty much hardcoded most of the globals we requested, causing compatibility issues with certain compositors like Weston, which support only some pretty old versions or miss some more advanced protocols. To put fuel on the fire, we also errored out when certain protocols weren't available, despite us being able to boot a game just fine (but obviously with a degraded featureset). The solution is to simply allow all the way from version 1 to the current latest, adding some compatibility code (such as for older `wl_output`s or newer `wl_pointer`s). While we're at it, this commit also fixes a few typos and naming inconsistencies I found.
* [DBus] Process file dialog callback in the main event loop instead of using ↵bruvzg2024-04-231-0/+6
| | | | deferred call.
* Polish interaction between windowing, input and renderingPedro J. Estébanez2024-04-102-9/+0
| | | | | - Adapt GL make/release API to the current architecture. - Fix DisplayServer being locked while dispatching input (prevent deadlocks).
* [DisplayServer] Add separate feature flags for different native dialog types.bruvzg2024-03-261-1/+3
|
* Merge pull request #87831 from Riteo/bitfield-xorRémi Verschelde2024-03-261-1/+1
|\ | | | | | | Core: Implement a XOR operator for BitField
| * Core: Implement a XOR operator for BitFieldRiteo2024-02-011-1/+1
| |
* | [Wayland] Fix typo in input codeA Thousand Ships2024-03-201-1/+1
| |
* | clang-tidy: Enforce `modernize-use-nullptr`Thaddeus Crews2024-03-122-5/+5
| |
* | Merge pull request #89328 from Riteo/wayland-cursor-frame-optRémi Verschelde2024-03-091-7/+14
|\ \ | | | | | | | | | Wayland: Setup next cursor frame callback only if animated
| * | Wayland: Setup next cursor frame callback only if animatedRiteo2024-03-091-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | Before, the cursor kept updating for no good reason really. It's also a bit neater and it ever-so-slightly makes `WAYLAND_DEBUG` logs easier to read, although they're still spammed by the window's frame logic (which is needed).
* | | Merge pull request #89307 from alesliehughes/wayland_usageRémi Verschelde2024-03-091-4/+24
|\ \ \ | | | | | | | | | | | | Wayland: Stop possible Null pointer dereferences
| * | | wayland: Stop possible Null pointer dereferencesAlistair Leslie-Hughes2024-03-091-4/+24
| |/ /
* / / wayland: Stop unreachable warningAlistair Leslie-Hughes2024-03-091-2/+2
|/ /
* | Merge pull request #87452 from bruvzg/native_menuRémi Verschelde2024-03-062-0/+14
|\ \ | | | | | | | | | Move `global_menu_*` methods to a separate `NativeMenu` class.
| * | Move `global_menu_*` methods to a separate `NativeMenu` class.bruvzg2024-03-042-0/+14
| | |
* | | Merge pull request #89178 from Riteo/gotta-have-them-allRémi Verschelde2024-03-051-3/+14
|\ \ \ | |/ / |/| | | | | Wayland: Properly report all used features
| * | Wayland: Properly report all used featuresRiteo2024-03-041-3/+14
| | | | | | | | | | | | Oops, missed a few.
* | | [Wayland] Fix tilt handlingA Thousand Ships2024-03-032-3/+2
|/ /
* | Merge pull request #88970 from KoBeWi/ImageCursor2DRémi Verschelde2024-02-292-32/+3
|\ \ | | | | | | | | | Improve `cursor_set_custom_image()` method
| * | Improve cursor_set_custom_image() methodkobewi2024-02-282-32/+3
| | |
* | | Wayland: Restore tablet support and handle multiple toolsRiteo2024-02-282-121/+151
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | This code was already partially there, although heavily incomplete and nowadays commented out. It got broken after the `WaylandThread` refactor and I didn't bother to bring it over, preferring to `#if 0` it into oblivion for the time being as I don't have a tablet/pen which support an eraser and tilt reporting. This commit brings it back and adds proper multi-tool support (needed for eraser detection) thanks to winston-yallow, who could test this code with their more capable tablet.
* | Wayland: suspend window after frame timeout or suspend stateRiteo2024-02-154-9/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-132-0/+5
| | | | | | | | change callback.
* | Finish splitting functionality of the Vulkan and D3D12 backends into ↵Dario2024-02-125-52/+75
| | | | | | | | RenderingDeviceDriver.
* | Merge pull request #88134 from akien-mga/scons-wayland-py3.12-escapeRémi Verschelde2024-02-091-4/+4
|\ \ | | | | | | | | | SCons: Use r-strings for wayland-scanner builder command
| * | SCons: Use r-strings for wayland-scanner builder commandRémi Verschelde2024-02-091-4/+4
| | | | | | | | | | | | Silences a Python 3.12 warning.
* | | 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
| |/
* | Fix various typos with codespellRémi Verschelde2024-02-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | Using 2.2.7.dev115+g0eb441d6. Had to add `cancelled` to the ignore list, as it's a Wayland signal which we're handling in our code, so we don't want codespell to fix that "typo". Also includes the typo fix from #87927. Co-authored-by: Divyanshu Shekhar <61140213+divshekhar@users.noreply.github.com>
* | wayland: Update to 1.22.0Jakub Marcowski2024-02-062-0/+18
|/
* Merge pull request #87764 from Riteo/wayland-native-handleRémi Verschelde2024-01-312-0/+33
|\ | | | | Wayland: Implement `window_get_native_handle`
| * Wayland: implement `window_get_native_handle`Riteo2024-01-312-0/+33
| | | | | | | | | | 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-315-1/+81
|/
* Add Wayland supportRiteo2024-01-3021-0/+9474
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.