summaryrefslogtreecommitdiffstats
path: root/platform/linuxbsd/wayland/display_server_wayland.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit godotengine/godot@c6c464cf9ae56e8b68620af65125dd980d0e8122Spartan3222024-11-021-1/+2
|\
| * [DisplayServer] Add feature flag for native file dialog access to `user/res` ↵Anish Mishra2024-10-301-1/+2
| | | | | | | | and `options`
* | Fix remainder of godotengine referencesSpartan3222024-10-311-2/+2
| | | | | | | | (cherry picked from commit 1d62a70c5bb74dfbffffe1c018a861719e93e7ae)
* | Merge commit godotengine/godot@8004c7524fb9f43425c4d6f614410a76678e0f7cSpartan3222024-10-301-1/+4
|\|
| * Fix fallbacks to OpenGLSummersay4152024-10-281-1/+4
| |
* | Merge pull request #818 from Spartan322/fixup/copyright-headersGeorge L. Albany2024-10-271-2/+2
|\ \ | | | | | | Fix copyright headers referring to Godot
| * | Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
| | |
* | | Merge commit godotengine/godot@61accf060515416da07d913580419fd8c8490f7bSpartan3222024-10-261-0/+12
|\ \ \ | |/ / |/| / | |/
| * Merge pull request #97771 from dsnopek/openxr-linux-eglThaddeus Crews2024-10-251-0/+12
| |\ | | | | | | | | | OpenXR: Add support for Wayland on Linux
| | * OpenXR: Add support for Wayland on LinuxDavid Snopek2024-10-041-0/+12
| | |
* | | Merge commit godotengine/godot@80f0b33313dae52d072ba2771a88ebcc4f0b4d6dSpartan3222024-10-181-1/+1
|\| |
| * | Fix wrong Wayland path if building with opengl3=noMatias N. Goldberg2024-10-121-1/+1
| |/ | | | | | | | | | | | | | | Godot checks if there's Vulkan or GLES3 support. If no support is found, it shows an error message. However the code for this error message is left out when building with opengl3=no
* | Rebrand preambles to RedotDubhghlas McLaughlin2024-10-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* | Rebrand Godot to RedotRandolph W. Aarseth II2024-10-111-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Linux Editor tests workflow matrix Add Windows Editor w/ Mono workflow matrix Add Generate Glue Code job to Windows workflow Add Build GodotSharp job to Windows workflow Add godot compatibility version references Add Godot author info Add Godot version compatibility info Add Godot donor info Add Godot authors and donors to editor_about.cpp Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* Fallback to OpenGL 3 if Vulkan isn't available on WaylandJoaquim Monteiro2024-09-211-12/+20
|
* Wayland: Simplify cursor code and fix custom cursorsRiteo2024-09-131-26/+7
| | | | | | | | | | | | Initially the WaylandThread cursor code was supposed to be as stateless as possible but, as time went on, this wasn't possible. This expectation made the resulting API quite convoluted, so this patch aims to simplify it substantially bot in terms of API surface and, most importantly, in terms of actual implementation complexity. This patch also fixes custom cursors since I accidentally changed the mmap flags to MAP_PRIVATE some time ago. This took me hours to notice.
* Merge pull request #96540 from hunterkepley/fix-wayland-middlemouse-pasteRémi Verschelde2024-09-041-1/+1
|\ | | | | | | Wayland: Fix primary clipboard handling
| * Wayland: Fix primary clipboard handlinghunterkepley2024-09-031-1/+1
| |
* | Merge pull request #91780 from Riteo/falling-with-styleRémi Verschelde2024-09-041-8/+51
|\ \ | |/ |/| | | Improve UX when falling back between Display Servers
| * Wayland: report when video drivers can't be loaded or foundRiteo2024-08-211-8/+51
| | | | | | | | This brings it to parity with the X11 backend.
* | Update rendering driver name on fallbacks. Fix rendering driver/method in ↵bruvzg2024-09-011-0/+1
|/ | | | the editor system info.
* Wayland: check for suspended flag when unsuspendingRiteo2024-07-161-1/+1
| | | | | Before, we would only check for the frame flag, which is unreliable on newer suspension-aware compositors.
* Improve handling of rendering startup errorsPedro J. Estébanez2024-06-281-1/+8
|
* Wayland: minimize surface commits and limit them to the main threadRiteo2024-06-281-21/+45
| | | | | | | | | | | | | | | | | | Before of this patch, as explained in the usual commented-wall-of-text-longer-than-the-actual-patch-itself™, due to the multithreaded nature of the Wayland thread, it was possible to commit a surface while the renderer was doing stuff, which was _very_ wrong. Initially the consequences of such a sin weren't obvious but, now that explicit synchronization is becoming more and more common, we can't commit a buffer randomly without basically guaranteeing a nasty, nasty crash (and we should have avoided commits altogether in the first place to ensure atomic surface updates). We now only trigger a commit _in the main thread_ when low processor usage mode is on _and_ if we know that we won't be rendering anything as, due to its intermittent nature, it makes "legacy" (pre xdg_wm_base v6) frame callback based suspension quite annoying.
* Merge pull request #93021 from bruvzg/wl_imeRémi Verschelde2024-06-191-4/+46
|\ | | | | | | [Wayland] Implement IME support.
| * [Wayland] Implement IME support.bruvzg2024-06-111-4/+46
| |
* | Merge pull request #92663 from Riteo/holy-egl-batmanRémi Verschelde2024-06-131-3/+3
|\ \ | |/ |/| | | EGL: Use `EGL_EXT_platform_base` whenever possible
| * EGL: Use EGL_EXT_platform_base whenever possibleRiteo2024-06-041-3/+3
| | | | | | | | | | | | This avoids any assumption from the driver, which would otherwise select a specific platform and potentially mess up everything, resulting usually in a display server failure.
* | Fix creating cursor image from AtlasTexturekleonc2024-06-051-2/+1
|/
* Merge pull request #89033 from bruvzg/doc_end_errRémi Verschelde2024-05-281-1/+8
|\ | | | | | | [DisplayServer] Add error messages and descriptions to callbacks.
| * [DisplayServer] Add error messages and descriptions to callbacks.bruvzg2024-05-281-1/+8
| |
* | Wayland: Implement is_window_transparency_availableRiteo2024-05-261-0/+9
|/
* Properly set window class in WaylandPaulo Poiati2024-05-221-3/+4
|
* 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.
* Wayland: Add support for OpenGL ES driverRiteo2024-05-031-16/+41
| | | | | Everything was already there, we just had to wire it up in the display server.
* [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-101-8/+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
|
* 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.