1
0
Fork 0
Commit Graph

1121 Commits

Author SHA1 Message Date
Dery Almas 27b1916465 Wayland: Update popup scale information on creation
Popups start with their size and position already scaled based on the parent.
We forgot to update the popup's scale itself, leading to a double-scale.
2026-01-22 06:28:27 +01:00
Rémi Verschelde a1e209b7fe
Merge pull request #115090 from deralmas/wayland-ime-bruh-moment
Wayland: Fix IME
2026-01-19 10:46:13 +01:00
Dery Almas 3a2a53f901 Wayland: Fix IME
The spec tells us to ignore certain events if we didn't get an `enter`
event first. Certainly we need to at least acknowledge the `enter` event
itself 😅
2026-01-18 09:47:23 +01:00
Dery Almas 8a448032c2 Wayland: Allow non-interactive window resizing
Despite what I thought in the past, it is allowed, as long as we follow
certain limitations depending on the toplevel's state.

As usual I peppered the code with comments expaining what those
limitations are.

Regarding popups, AFAICT there are no major limitations, although we
should eventually use the new `reposition` method, which autoadjusts the
popup to follow the screen's borders and whatnot. I didn't do that in
this patch as it requires some elbow grease, especially if we want to do
it synchronously.
2026-01-14 11:20:06 +01:00
Rémi Verschelde 38293c4d39
Merge pull request #114820 from AR-DEV-1/114652
X11: Allow moving a fullscreen/maximized window to another screen/display
2026-01-13 11:06:34 +01:00
Rémi Verschelde 571c574f96
Merge pull request #113950 from deralmas/wl-misc-fixes/not-listening
Wayland: Ignore IME events without a valid window
2026-01-13 11:06:00 +01:00
Rémi Verschelde 865dbfc2fb
Merge pull request #113949 from deralmas/wl-misc-fixes/too-much-debugging
Wayland: Remove `GODOT_DEBUG_EMBEDDER_SINGLE_INSTANCE` debug option
2026-01-13 11:05:54 +01:00
AR cc71d5a2be
X11: Allow moving a fullscreen/maximized window to another screen/display 2026-01-13 09:52:07 +01:00
Ville Baillie e02b117af7 wayland_embedder.cpp: fix duplicated-branches error 2026-01-08 19:01:33 +00:00
Riteo Siuga 33a48f1387 Wayland: Track popup menu mouse mask properly
We were updating `last_mouse_monitor_mask` only if there were popup
menus open, which is obviously wrong.
2026-01-03 21:48:18 +01:00
Chestnut45 3be85a8614 Lower timeout in X11 event thread to fix input delay issue 2025-12-18 15:01:48 -04:00
Rémi Verschelde 0509500a9f
Merge pull request #114081 from deralmas/thirdparty/libdecor/0.2.5
libdecor: Regenerate dynamic wrapper
2025-12-17 13:58:46 +01:00
Dery Almas bea572fc00 libdecor: Regenerate dynamic wrapper 2025-12-17 13:17:14 +01:00
Riteo 0e21840973 Wayland: Add environment variable to disable libdecor loading
Libdecor has some quirks and depending on the setup it might be useful
to switch to the xdg-shell branch. Recompiling the whole engine without
libdecor is not an acceptable way to do that.
2025-12-16 19:12:49 +01:00
Rémi Verschelde 3e2f769ddf
Merge pull request #113947 from deralmas/wl-misc-fixes/cleanup-forgor
Wayland: Add missing destroy calls for text input and tablet
2025-12-16 11:26:53 +01:00
Rémi Verschelde d84a8a63fa
Merge pull request #113946 from deralmas/wl-misc-fixes/mfw-mutating-a-copy
Wayland: Fix accidental copy during global remove
2025-12-16 11:26:47 +01:00
Rémi Verschelde 5d5db072f3
Merge pull request #113656 from deralmas/gray-goo-scenario
Wayland: Work around window scale ambiguity
2025-12-16 11:26:42 +01:00
Rémi Verschelde 61b5f80a50
Merge pull request #113256 from deralmas/wl-keyboard-stuff
Wayland: Misc keyboard touchups
2025-12-16 11:26:31 +01:00
Thaddeus Crews 206f1b5a7c
Merge pull request #113977 from deralmas/wl-misc-fixes/shhhhh
Wayland: Silence `window_get_wl_surface` on invalid window
2025-12-15 08:01:05 -06:00
Dery Almas 874dd28d66 Wayland: Silence window_get_wl_surface on invalid window
Makes it more consistent with the rest of the `WaylandThread` methods
(so that we can silently check for the window's existence).

Fixes errors when trying to capture the pointer when no surface has been
pointed yet (its logic assumed that this method was silent).

We double-check everywhere anyway but I added it in some places where we
can't either guarantee that it'll check (to avoid segfaults) or that
would be useful to report directly.
2025-12-13 10:10:29 +01:00
Dery Almas 55360ec825 Wayland: Ignore IME events without a valid window
The spec says "After leave event, compositor must ignore requests from
any text input instances until next enter event."

Fixes an error on jay, which at least on 1.11.0 sends
`zwp_text_input_v3::done` after `zwp_text_input_v3::leave`, which we
didn't ignore, leading to a commit without a valid window id.
2025-12-12 19:40:02 +01:00
Dery Almas a8e1d23855 Wayland: Remove GODOT_DEBUG_EMBEDDER_SINGLE_INSTANCE debug option
This is _extremely_ specific, and was meant to be removed after a review
in the game embedder PR. No idea how it found its way back in.
2025-12-12 19:23:26 +01:00
Dery Almas 1d1cd7cc1a Wayland: Add missing destroy calls for text input and tablet
Thank you Kiisu_Master for finding this!
2025-12-12 19:22:19 +01:00
Dery Almas b439a71db3 Wayland: Fix accidental copy during global remove
We were accidentally mutating a copy during cleanup of the viewporter
and fractional scale manager.

Thank you Aaron Franke for finding this out :D
2025-12-12 19:06:29 +01:00
Pāvels Nadtočajevs 1251348c96
[Wayland] Implement `keyboard_get_label_from_physical` 2025-12-10 13:19:35 +02:00
Rémi Verschelde 342ba8063e
Merge pull request #112361 from Calinou/export-dedicated-server-no-shader-baker
Disable shader baker when exporting as dedicated server
2025-12-09 19:54:22 +01:00
Thaddeus Crews e98e8c555a
Merge pull request #113341 from DSOE1024/linuxbsd-xfce-exo-open
Implement XFCE support in os_linuxbsd.cpp
2025-12-08 11:53:52 -06:00
DSOE1024 b982794b23 Implement XFCE support in os_linuxbsd.cpp
Added support for XFCE by executing 'exo-open' alongside 'kde-open'.
Refactor error handling in os_linuxbsd.cpp
2025-12-08 21:21:45 +08:00
Berke Güzel 48c50bacba Wayland: Fix laggy window resize
scale_changed and size_changed were incorrectly initialized to true,
causing redundant WindowRectMessage and DPI change events to be pushed
on every configure event regardless of actual changes.
2025-12-07 13:29:19 +03:00
Dery Almas 99b109e981 Wayland: Work around window scale ambiguity 2025-12-06 00:54:50 +01:00
Rémi Verschelde 8981cede94
Merge pull request #113235 from timothyqiu/motif-close
X11: Skip Motif function hints when borderless
2025-12-05 12:55:49 +01:00
Adam Scott 10c7cb878a
Add new monospace related hint strings
- Add hint string `monospace` for `PROPERTY_HINT_{NONE,PASSWORD,PLACEHOLDER_TEXT}` to set the `LineEdit` font monospaced.
- Add hint string `monospace` for `PROPERTY_HINT_MULTILINE_TEXT` to set the `TextEdit` font monospaced.
- Add hint string `no_wrap` for `PROPERTY_HINT_MULTILINE_TEXT` to make the `TextEdit` not wrap lines automatically.

Also:
- Fix issue with `EditorPropertyMultilineText` not updating font properly.
- Add `EditorPropertyMultilineText` tweak flags.
- Add support with GDScript `@export_multiline`.
2025-12-03 12:57:40 -05:00
Rémi Verschelde 71d4ded745
Merge pull request #113279 from Ivorforce/tracy-gdscript-codeloc
Add support for profiling GDScript with tracy.
2025-12-02 14:16:56 +01:00
Rémi Verschelde 1c7ef74f4f
Merge pull request #113346 from deralmas/wl-keyboard-saga/unify-keys
Wayland: Unify key handling logic
2025-12-01 11:50:11 +01:00
Dery Almas 9a814b4444 Wayland: Unify key handling logic
Previously we had different logic for direct key presses and client-side
key repetition, as one queued up input events and the other dispatched
them directly (client-side key repetition is run from the main thread).

I kinda figured out that this difference doesn't really matter, as we
can queue them up before the thread message dispatching logic. That's
exactly what we do now, which allows us to make a single method for both
of them, making the code much clearer and simplifying future maintenance.

This patch also includes a tiny fixup in the compose logic, which checks
for the validity of the generated key event before actually working with
it. The cases in which we can end up with an invalid reference are very
few, so it's not the end of the world, but it's still absolutely a good
idea to check, to avoid nasty surprises down the line.
2025-11-30 05:11:40 +01:00
LanzaSchneider 3a965d50fe Fix incorrect format specifier for bool in Wayland libdecor 2025-11-29 10:20:27 +08:00
Lukas Tenbrink acefbbbbcd Add support for profiling GDScript with tracy.
This adds macro `GodotProfileZoneGroupedFirstScript`, and uses interning for speedy lookups.

Co-authored-by: Samuel Nicholas <nicholas.samuel@gmail.com>
2025-11-28 16:36:36 +01:00
Riteo Siuga f90a9ad659 Destroy XKB keymap and state on seat capability change
Wasn't that much of a concern as it would have been disposed of next
time a keyboard got added, but it's still a good thing to do.
2025-11-27 23:02:08 +01:00
Dery Almas a79239e332 Wayland: Add default keyboard repetition values
The `wl_keyboard::repeat_info` event got introduced in version 4. On
versions older than that, we defaulted to 0 delay, which means no
repetition. That's a veeery old version and basically everything offers
it, but it doesn't hurt to add a reasonable default.
2025-11-27 22:37:28 +01:00
Dery Almas b0a42784f1 Wayland: Fix SIGFPE with repeat rate of 0
We always divided by the rate, which could be zero, which is a valid
value (it means "disable key repeating").
2025-11-27 22:37:28 +01:00
Rémi Verschelde e28ef68957
Merge pull request #113135 from deralmas/buffer-jaywalking
Wayland: Fix trailing garbage error while using the embedder on Jay
2025-11-27 21:48:12 +01:00
Haoyu Qiu f694c64ac4 X11: Skip Motif function hints when borderless 2025-11-27 21:53:28 +08:00
Rémi Verschelde 1667e6fcce
Merge pull request #113195 from teromene/master
Include xkb-compose in `wayland_thread.h`
2025-11-26 23:44:49 +01:00
teromene b8ef67586d Include xkb-compose in wayland_thread.h. Fixes builds without SOWRAP_ENABLED 2025-11-26 16:00:08 +01:00
Michael Alexsander 69ff129e33
Fix error message when closing the project manager on Wayland 2025-11-26 11:16:08 -03:00
Thaddeus Crews 0ebb11041b
Merge pull request #113138 from deralmas/embedder-oopsies
Wayland: Fix Wayland driver in export templates
2025-11-25 07:06:59 -06:00
Dery Almas 8fb195e20d Wayland: Fix Wayland driver in export templates
I might have accidentally put the socket connection logic inside a
`TOOLS_ENABLED` `#ifdef` xD
2025-11-25 03:36:16 +01:00
Dery Almas 1fb101f7a5 Wayland: Fix trailing garbage error while using the embedder on Jay
`send_wayland_message` takes in the number of words, not its byte size.
This meant that we were sending quite a bit of out-of-bounds stuff
alongside the four arguments required by
`xdg_positioner::set_anchor_rect`, which triggered an assertion on Jay.

This didn't pop up before because the C wayland server library does not
seem to check this, but it's a valid (and useful!) assertion
for other server implementations nonetheless.

This patch switches to the initializer_list syntax to make the intent
clearer.
2025-11-25 01:34:52 +01:00
Thaddeus Crews e1b3387513
Merge pull request #108704 from wjt/xdg-portal-inhibit
Support XDG Inhibit portal
2025-11-24 15:59:56 -06:00
Thaddeus Crews 7477823ad5
Merge pull request #113068 from deralmas/writing-with-style
Wayland: Implement compose and dead key support
2025-11-24 10:21:31 -06:00