1231 Commits

Author SHA1 Message Date
Thaddeus Crews ef02314f2b Merge pull request #119545 from bruvzg/exp_noti
Fix export notifier.
2026-05-18 11:06:32 -05:00
Thaddeus Crews 819cae99f8 Merge pull request #119331 from norepro/fix-x11-release-pressed-events
Release X11 pressed events on true focus loss
2026-05-18 11:06:26 -05:00
Pāvels Nadtočajevs 4742cd3b80 Fix export notifier. 2026-05-18 15:39:24 +03:00
Thaddeus Crews 7af66e02ef Merge pull request #119448 from buresu/fix-wayland
Wayland: Fix incorrect fallback value for height in _xdg_popup_on_configure
2026-05-15 15:42:05 -05:00
Michael Alexsander 088cd1faa4 Fix wrong path in EditorExportPlugin._export_begin() when zipping 2026-05-14 19:44:40 -03:00
Naoto Kondo 814d08d77f Wayland: Fix incorrect fallback value for height in _xdg_popup_on_configure 2026-05-14 10:44:44 +09:00
norepro 800223a043 Release X11 pressed events on true focus loss
There are two "focus lost" signals in the Godot X11 display server:

1. `FocusOut` - native X11 signal

2. `NOTIFICATION_APPLICATION_FOCUS_OUT` - Godot signal after 250ms of
no other window getting focus.

When focus is lost, the intent is to clear any input pressed events so
that, when focus returns, we have a clean slate.

The bug is that the pressed events are (attempted to be) cleared on the
first signal, X11's `FocusOut`. This is always a no-op because it
returns early if the application still has focus. Godot's X11 server
only sets that flag after the second signal, not the first.

Move the pressed event clearing from the first signal handler to the
second. This makes clearing pressed events do what it says.

This does not affect Wayland because it does not have the 250ms grace
period.

Simple repro is to load any 3D scene, hold 'W' and, while 'W' is held,
click on any non-Godot window. Release 'W', click back to Godot, and
hold RMB. It will zoom forward as if 'W' is still pressed.

After the fix, the same test has RMB look around as expected when no
other keys are pressed.

Fixes #118897
2026-05-08 00:41:20 -07:00
Thaddeus Crews ee4e7e51bc Merge pull request #119303 from norepro/x11-xsync-badwindow-errors
Fix some X11 BadWindow errors not being ignored
2026-05-07 11:13:31 -05:00
Aaron Franke 7ffda5c701 LinuxBSD crash handler: Move addr2line finding to its own function 2026-05-07 00:14:50 -07:00
norepro 3ffec30d51 Fix some X11 BadWindow errors not being ignored
Godot suppresses X11 BadWindow errors during some operations because
they can occur with normal usage.

X11 errors are asynchronous. Sometimes, when a BadWindow error is sent,
it is dequeued after the original non-BadWindow-suppressing error
handler has been restored. This results in an error callstack being
shown to the user.

Call `XSync` before restoring the original error handler. This ensures
that any queued BadWindow errors go to the suppressing handler.

Fixes #117814
2026-05-06 22:55:31 -07:00
Thaddeus Crews b786c890b6 Merge pull request #119252 from deralmas/wl/embedder-mods
Wayland Embedder: Track keyboard modifier keys
2026-05-06 14:56:32 -05:00
Thaddeus Crews fddd45ea1c Merge pull request #119091 from ArchercatNEO/context-driver-surface-supports-hdr
HDR: Implement checking if surface supports HDR output.
2026-05-06 14:56:27 -05:00
ArchercatNEO 3f29efc8a2 HDR: Implement surface supports HDR output.
Previously the Wayland display server would attempt to enable
HDR output and try to detect if it failed afterwards which had some issues.
Now we can query the rendering driver for support and avoid ever enabling
HDR output when this would fail.
2026-05-06 19:51:54 +01:00
Pāvels Nadtočajevs 873131973a Fix incorrect feature overrides when exporting for Linux. 2026-05-06 10:23:18 +03:00
Dery Almas ef5a2569e7 Wayland Embedder: Track keyboard modifier keys
The Wayland spec says:

> The compositor must send the wl_keyboard.modifiers event after this
event.

We did not during "fake" focus changes (e.g. from/to embedded
applications), effectively resetting the modifier state.

This patch simply tracks keyboard modifiers and informs clients whenever
we send custom enter events.
2026-05-05 12:49:26 +02:00
Allen Pestaluky 4309120a4a Fix DisplayServerWayland::window_is_hdr_output_supported to check rendering device for HDR output support and adjust warnings/errors. 2026-04-20 11:11:01 -04:00
Thaddeus Crews 54f1178d3c Merge pull request #118676 from bruvzg/crash_mod+fmt
[macOS/Linux] Add module information to the crash handler.
2026-04-20 09:15:31 -05:00
Pāvels Nadtočajevs 958510c3e9 Add a bunch of missing window existence checks to HDR methods 2026-04-17 15:53:13 +03:00
Pāvels Nadtočajevs dfe2abbf26 [macOS/Linux] Add module information to the crash handler. 2026-04-17 15:52:00 +03:00
Thaddeus Crews 21dbe711c5 Merge pull request #113886 from deralmas/wl-touch
Wayland: Implement touch support
2026-04-15 14:02:35 -05:00
Rémi Verschelde 96c2ddf39a Merge pull request #117060 from AThousandShips/fix_symbols_linux
[Linux] Improve crash trace symbols
2026-04-15 12:40:35 +02:00
Thaddeus Crews 8e0030b4ee Merge pull request #118554 from deralmas/wl/complex-pointer-frames
Wayland: Handle complex pointer event frames
2026-04-14 07:11:03 -05:00
A Thousand Ships 8fe002819e [Linux] Improve crash trace symbols
Uses `addr2line` to also demangle symbols when available.
2026-04-14 12:51:58 +02:00
Dery Almas 3883ba2a34 Wayland: Handle complex pointer event frames
From the spec:

> The wl_pointer.enter and wl_pointer.leave events are logical events
> generated by the compositor and not the hardware. These events are
> also grouped by a wl_pointer.frame. When a pointer moves from one
> surface to another, a compositor should group the wl_pointer.leave
> event within the same wl_pointer.frame. However, a client must not
> rely on wl_pointer.leave and wl_pointer.enter being in the same
> wl_pointer.frame. Compositor-specific policies may require the
> wl_pointer.leave and wl_pointer.enter event being split across
> multiple wl_pointer.frame groups.

From my understanding™ this means that a compositor SHOULD group
leave/enter events together. Is this common? From my testing... Not
really. Notably, (only?) KDE does this.

Our pointer frame event assumed that we would be working with the
currently pointed window but since all events must be logically grouped
together I think it can really only group "normal" events related to the
*leave* event.

Now, whenever there's a pointer focus change, we send everything to the
old window, if it exists, otherwise the currently pointed one.

This approach seems to handle complex event frames with both leave and
enter events properly now, with good results on all compositors.

This patch also and makes it harder to get to a null check when the
window simply does not exists (the error was meant only for existing but
invalid windows), along with an helper method to aid in this.
2026-04-14 01:18:55 +02:00
Thaddeus Crews 50cc2823d5 Merge pull request #118404 from Rindbee/set-ime_active-to-false-when-the-IME-stops
Set `ime_active` to `false` when the IME stops on X11
2026-04-13 11:46:10 -05:00
风青山 52e79da660 Warn only once when the input method stops on X11
An input method is not required for the application to run.

However, it is still assumed that the user requires an input method
for text input; therefore, in order to avoid generating spam, a warning
is issued only once whenever the input method becomes inactive.
2026-04-13 17:05:19 +08:00
风青山 045c16b596 Set ime_active to false when the IME stops 2026-04-11 14:44:56 +08:00
Rémi Verschelde 7567211e8b GLES3: Split EGL includes in platform_egl.h
EGL brings in platform-specific headers such as the dreaded `windows.h`,
and `platform_gl.h` is used throughout `drivers/gles3` for basic OpenGL
types such as `GLuint`. We don't want `windows.h` pollution there.

Note for Android: EGL seems used explicitly only via `rasterizer_gles3.cpp`
to enable GL debug printing, and some custom stuff in `config.cpp`.
2026-04-07 12:07:22 +02:00
Dery Almas ac913816d4 Wayland: Initialize libdecor earlier
It has its own bookkeeping which would not immediately initialize in
certain setups, leading to crashes.
2026-04-04 23:09:22 +02:00
Thaddeus Crews e37b5c4035 Merge pull request #118076 from allenwp/output-max-linear-value-events
[Apple, Wayland] HDR Output: Emit window events when HDR state changes
2026-04-03 11:52:22 -05:00
ArchercatNEO 1d14370d55 Wayland: Fix building with libdecor=no 2026-04-03 10:08:11 +01:00
Allen Pestaluky f9145cbc72 Add HDR events for Wayland and Apple display servers
Co-authored-by: ArchercatNEO <tururu.pompella@gmail.com>
2026-04-02 12:50:38 -04:00
Thaddeus Crews 0f51ed6099 Merge pull request #113543 from bruvzg/win_icons
[DisplayServer] Add per window icon support.
2026-03-30 13:35:47 -05:00
Thaddeus Crews 521e442754 Merge pull request #115896 from bruvzg/trace_x
[CrashHandler] Always print frame PCs and main module load address for retrace.
2026-03-30 13:35:29 -05:00
Thaddeus Crews 5ee90d8e82 Merge pull request #117873 from deralmas/wl/send-reinforcements
Wayland: Unify clipboard sending code
2026-03-30 13:35:26 -05:00
Thaddeus Crews a644e7ff38 Merge pull request #114861 from dalexeev/improve-editor-only-class-checking
Improve editor-only class checking
2026-03-30 13:35:14 -05:00
Pāvels Nadtočajevs c20e4dd010 [CrashHandler] Always print frame PCs and main module load address for retrace. 2026-03-27 11:34:36 +02:00
Dery Almas b1c216d916 Wayland: Unify clipboard sending code
The primary and selection parts would constantly get out of sync.

Also fixes a wrong return value in `primary_get_mime`.
2026-03-27 04:33:52 +01:00
Rémi Verschelde e030230a99 Merge pull request #117445 from bruvzg/angle_no_dyn
[macOS/Windows] Remove dynamically linked ANGLE support, add flag to enable/disable ANGLE.
2026-03-26 16:01:25 +01:00
Rémi Verschelde c19a2705af Merge pull request #116692 from deralmas/wl/i-love-multithreading
Wayland: Fix race with buffer scaling
2026-03-26 16:01:14 +01:00
Rémi Verschelde 915f8dcba7 Merge pull request #116648 from gongpha/wayland-clipboard-fix
Fix clipboard history not updating on subsequent copies in Wayland
2026-03-26 16:01:08 +01:00
Danil Alexeev 32d1f518fa Improve editor-only class checking 2026-03-25 17:07:39 +03:00
Pāvels Nadtočajevs 5fc9f6b3d9 [macOS/Windows] Remove dynamically linked ANGLE support, add flag to enable/disable ANGLE.
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2026-03-23 13:01:25 +02:00
Pāvels Nadtočajevs d47b8d7a64 [DisplayServer] Add per window icon support. 2026-03-23 11:27:09 +02:00
ArchercatNEO 8be7b9f18c Wayland: Fix use-after-free of Ref<ColorManagementProfile>
Fixes #117676
PR #111964 made a Ref<ColorManagementProfile> which we intentionally
leaked across a client-server barrier owned, which caused a use-after-free.
Manually adding reference/unreference calls keeps the ptr valid without memory leaks.
2026-03-21 09:28:43 +00:00
Dery Almas ab135ca3c2 Wayland: Implement touch support 2026-03-20 15:42:20 +01:00
Dery Almas 2d74e56caf Wayland: Fix race with buffer scaling
We now pass the buffer scale along the window size to the display server
and set everything from there.

This should avoid races where the buffer scale changes while we handle
window rect changes.
2026-03-20 14:24:38 +01:00
Thaddeus Crews fb4a304dee Merge pull request #111965 from Ivorforce/memnew-typed
Make `memnew(RefCounted)` return `Ref`, to improve ownership safety
2026-03-19 15:39:15 -05:00
Thaddeus Crews fa4d24cbb5 Merge pull request #116513 from deralmas/wl/dedup-global-remove
Wayland: Deduplicate cleanup logic
2026-03-19 10:19:52 -05:00
Lukas Tenbrink 05c33acbb1 Make memnew(RefCounted) return Ref, to force callers to take ownership of it through a reference. 2026-03-18 20:34:08 +01:00