Commit Graph

7486 Commits

Author SHA1 Message Date
Dery Almas c563a1f251 Wayland: Improve mapping robustness and synchronization
We assumed that a window will be ready after a single roundtrip but
that's actually not guaranteed by the XDG shell protocol.

This patch waits for an arbitrary timeout (10s) before erroring out and
forcefully closing the window. Since this exercised quite some code
paths, it also reworks some window handling logic and fixes a bunch of
synchronization issues.

(cherry picked from commit eb680bc8c3e4a811dc8736716fd9cf57567c21dd)
2026-03-31 08:51:01 -05:00
arthurmtro 46fb015202 [macOS] Pass parent environment to spawned app instances
(cherry picked from commit 2df02c8463f9b57467c5e7b1443c09169548a0ef)
2026-03-18 10:37:18 -05:00
Anish Kumar 8402ed6435 Android: Fix crash when emitting signal with java.util.HashMap
(cherry picked from commit 5387f0d596dde3583e1e6c4c856ceba7ac046825)
2026-03-18 10:37:18 -05:00
DSOE1024 18d11e0ce4 Add UTF-8 encoding to svg file open in platform_builders.py
Specify UTF-8 encoding when opening the source file.

(cherry picked from commit a61e6ffade5b678956f209e7bf99582aeba7d052)
2026-03-18 10:37:14 -05:00
Pāvels Nadtočajevs 4db15671c0 [macOS] Force ANGLE (GL over Metal) when running in VM.
(cherry picked from commit 3d62c026f6b585f9467c7d7c550e5afa9ea3f587)
2026-03-18 10:37:12 -05:00
Pāvels Nadtočajevs 347e610524 [Windows] Set current driver when ANGLE init fails.
(cherry picked from commit b9554859f62a189da846e2220b2bf4aa34b59b21)
2026-03-18 10:37:10 -05:00
Pāvels Nadtočajevs 2d7c3e73d8 [macOS] Enable wake for events if Magnet is running.
(cherry picked from commit f7faabb95e7e6a291bd5e1fd486bcab8206e33d5)
2026-03-18 09:39:14 -05:00
Anish Kumar ceb9fdbd65 Android: Fix FileAccess crash when using treeUri in Gradle-built apps
(cherry picked from commit ed8853b8d123b458b2a387be708fec9b2486276f)
2026-03-06 15:18:34 +01:00
Anish Kumar 41635cea86 Android Editor: copy keystore to temp file during export
(cherry picked from commit 6a65e06e69f0a9486b7d87b6435fefdfbc4c86b9)
2026-03-06 12:41:40 +01:00
kit 6f79fde2ef Fix crash on removing Windows PopupMenu submenu
(cherry picked from commit f3dacf24b0b60e78ca74f2566eef26fb0c7d1767)
2026-03-05 18:10:06 -06:00
Josef Ott 547a094a08 FEATURE_NATIVE_DIALOG_FILE always true for android
(cherry picked from commit fc711baa23033a01407bdb37ce8e987f4b62db07)
2026-03-05 13:29:41 -06:00
Anish Kumar 701ae9e552 Enable native file picker support on Android 9 and older
(cherry picked from commit c7e5caa68eb97db400160a71082cdde1a183965f)
2026-03-05 13:29:40 -06:00
Mikael Hermansson 41840b0363 Add nullptr checks of script_debugger in LayerHost::gui_input
(cherry picked from commit 622efbe23b7c60b3765043a4fad5b8cb73341bb2)
2026-03-05 13:29:36 -06:00
Pāvels Nadtočajevs 5062a03a17 [macOS] Fix confined mouse movement getting out of sync.
(cherry picked from commit d1698255bc9f509923e71fe83d24e1995f627fde)
2026-03-05 10:36:27 -06:00
mxtherfxcker 531219aa7c LinuxBSD: Fix UI freeze when opening file manager
(cherry picked from commit d78857b53e1113861a995e0df6bf36a134a930d2)
2026-03-05 10:36:22 -06:00
Fredia Huya-Kouadio 7c856efd30 Fix Android JavaClassWrapper test crashes on API 26 and lower
(cherry picked from commit 8e5c352b482d892d169a4fd97e98f1fdc627c82a)
2026-03-05 10:36:14 -06:00
Anish Kumar d338295d3e Fix file access tests failing on older Android devices
(cherry picked from commit ddffef6fb17231791b39d4f59440636293883998)
2026-03-05 10:36:09 -06:00
David Snopek 310e1317b0 Android: Fail instrumented tests when test function doesn't complete
(cherry picked from commit ec404a91d37f17ac9bfc7958a70888828846b22d)
2026-03-05 10:36:00 -06:00
Pāvels Nadtočajevs b95b9c1374 [macOS] Hide input accessory popups when no text control selected.
(cherry picked from commit 6b67059d940d58fd9be356bcb9714ec17219bbf8)
2026-03-05 10:35:49 -06:00
A Thousand Ships 6e7385defc [Linux] Handle debug symbols with renamed executable
GNU debug link expects the file to have the same name as when compiled,
same solution as on Windows.

(cherry picked from commit 4e8cba2d225cd385bba2512d714d01197dc914b2)
2026-03-05 10:35:31 -06:00
Pāvels Nadtočajevs 64b5c92278 [Windows] Use executable icon as default for the window.
(cherry picked from commit b0320ef4ff65eaf0d51c6d30f5f8e9a08054f22b)
2026-03-05 10:35:20 -06:00
Dery Almas 8054ff5d03 Wayland: Skip resize request when the size is the same
`DisplayServer::window_set_size` is called lots of times in the code,
with the assumption (I suppose) that it's going to be idempotent.

We had checks in _update_window_rect but we still called
`WaylandThread::window_set_size`, which did a lot of stuff. In
particular, this caused issues with HiDPI as it "overrode" the window
size before it had a time to figure out its scale.

(cherry picked from commit 870631211f507b302b3fbc289a62891115ad7a29)
2026-02-20 12:29:18 -06:00
Hugo Locurcio e07be1c9bd Fix EditorSettings error due to android_sdk_path when exporting a project
This editor setting is queried once every 3 seconds, as it is used
to check whether devices have been (dis)connected for one-click deploy.

This method may be called early on depending on initialization order,
which has led to occasional error messages when exporting a project.
The method now returns early if EditorSettings isn't ready yet
(it will be called again soon after anyway).

(cherry picked from commit 7d6d11f8d8a6c39d8077fe80937e5c000d1f832c)
2026-02-20 12:29:17 -06:00
Pāvels Nadtočajevs d37348f94c [macOS] Add null check to get_framework_executable.
(cherry picked from commit 07851f82719d65a34b425e0a204d23d0159aa36e)
2026-02-20 12:29:16 -06:00
Dery Almas 539c06f94d Wayland: Only handle the current output mode
Some compositors (e.g. COSMIC) can report *all* supported output modes,
not just the current mode. This is valid, albeit deprecated, so let's
add a check and ignore any non-current output events.

(cherry picked from commit dc8e7ef2ce5deb8353a688951e9686f4510629a6)
2026-02-20 12:29:15 -06:00
Sertonix 9dff014efd Fix missing lib with builtin_glslang=false
The `GetDefaultResource` function is in separate library file.

(cherry picked from commit cdafcefb6b5a467e2741d30f82d2f00a9e723335)
2026-02-06 08:34:51 -06:00
Anish Kumar ac86b22f3b Fix crash in StorageScope.kt on Android
(cherry picked from commit 40b770ecf019c3742b4dbc9a8ce7b11168f99824)
2026-02-05 10:05:06 -06:00
Anish Kumar f9fc70cf96 Android: Fix plugin type mismatch regression
(cherry picked from commit 5928e260d428bee0afe5d5ca0f8bbfde832eb4f2)
2026-02-05 10:05:05 -06:00
Anish Kumar a570951ff4 Android: Fix Bad file descriptor in SAF/MediaStore in long term access
(cherry picked from commit 1c80b25af8c6c6f8cf6c80b96e7fdb10a18efa8a)
2026-02-05 10:05:00 -06:00
Dery Almas 6a0b2db3ac Wayland Embedder: Fix FD leak with inert objects
Freshly deleted objects are temporarily "inert" until their destruction
is acknowledged by the compositor.

Inert objects are ignored. By doing so, we mistakenly returned too
early and missed some FD cleanup logic. This patch ensures that any
outstanding FDs are always closed by moving its logic outside of the
message handling routine.

(cherry picked from commit 6e5d1e00e02cf9086224b5eb3258f901a26de413)
2026-02-05 09:46:08 -06:00
bruvzg 5222598c11 [Windows] Disable MSVC control flow check on IAT hooks.
(cherry picked from commit 9c753ebe8432991c88a0b0c934f8dea029f59b6f)
2026-02-05 09:46:06 -06:00
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
Fredia Huya-Kouadio 7bebe1b1b1 Fix XR build regression reported in https://github.com/GodotVR/godot_openxr_vendors/issues/429 2026-01-19 19:09:33 -08: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
Rémi Verschelde 9820f40f96 Merge pull request #115010 from akien-mga/windows-mingw-fix-hidsdi-extern-c
Windows: Add missing `extern "C"` for `hidsdi.h` on MinGW < 12.0.0
2026-01-16 13:23:34 +01:00
Rémi Verschelde 5ce4e5da14 Merge pull request #114082 from deralmas/telekinesis
Wayland: Allow non-interactive window resizing
2026-01-16 13:23:18 +01:00
Rémi Verschelde dac17215ad Windows: Add missing extern "C" for hidsdi.h on MinGW < 12.0.0
Follow-up to #113013.
2026-01-15 23:49:13 +01:00
Pāvels Nadtočajevs c3bef1b83f Split EmbeddedProcess::reset to allow stopping timers without full reset. 2026-01-15 11:19:43 +02: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
Rémi Verschelde 4089843d13 Merge pull request #114781 from bruvzg/fd_all_pref
Do not apply "*" as preferred extension.
2026-01-09 10:47:08 +01:00
Rémi Verschelde 1f64c2c9bc Merge pull request #114756 from vmbaillie/issue-114755-fix
WaylandEmbedder: Fix `-Wduplicated-branches` warning
2026-01-09 10:46:47 +01:00
Pāvels Nadtočajevs f1a0a2aabe Do not apply "*" as preferred extension. 2026-01-09 08:53:47 +02:00
Rémi Verschelde 4595e5fc6c Merge pull request #114207 from m4gr3d/fix_anr_on_exit
Android: Fix ANRs when shutting down the engine due to the render thread
2026-01-08 22:57:13 +01:00
Ville Baillie e02b117af7 wayland_embedder.cpp: fix duplicated-branches error 2026-01-08 19:01:33 +00:00
Troy Bonneau 2fe73ad967 Web: Fix clipboard text encoding in update_clipboard_callback
Replaces direct assignment with String::utf8 to ensure clipboard text is correctly interpreted as UTF-8.
2026-01-08 19:55:28 +01:00