Commit Graph

7278 Commits

Author SHA1 Message Date
1a3a254e26 Support XDG Inhibit portal
Previously, on Linux and BSD, inhibiting the screensaver was handled
using the org.freedesktop.ScreenSaver D-Bus API. Unfortunately, this API
is not available in a Flatpak sandbox. (This is because there is a
desire to tie inhibit sessions to a specific app and visible window; but
the org.freedesktop.ScreenSaver API does not support this.)

As a result, when using the Flatpak build of the Godot Editor (or a
Flatpak-ed build of a game) and using a controller to play a game, the
session will become idle after a few minutes.

The XDG desktop portal -- which is already used for color-picking, file
choosing, and querying the system theme -- has an Inhibit interface that
provides a superset of the functionality of the
org.freedesktop.ScreenSaver API, and is available to any sandboxed app.

Refactor code for making XDG portal requests that was previously
duplicated for the FileChooser and ColorPicker portal code. Check the
portal version to determine whether these portals can be used:

- FileChooser portal version 3 is required due to the use of the
  "directory" parameter.

- On the Settings portal, the only addition in version 2 is the
  ReadOne() method which is not used here, so version 1 suffices.

- On the Screenshot portal, the only addition in version 2 is the
  "interactive" parameter to the Screenshot() method; this code only
  uses the PickColor() method, so version 1 suffices.

Then, add support for the Inhibit portal. Use it if available and if
running in a sandbox. Prefer to use org.freedesktop.ScreenSaver if not
running in a sandbox, even if the portal is available, because (at least
in the GNOME 43 implementation of the portal) it does not work correctly
if the portal cannot map the request to a running app. This adds a small
amount of complexity to the implementation, but supporting both APIs is
necessary anyway (there are many systems in the wild that support
org.freedesktop.ScreenSaver but not the desktop portal).

Fixes https://github.com/godotengine/godot/issues/108634
2025-11-17 11:46:28 +01:00
fa451cd05b Merge pull request #112777 from m4gr3d/add_android_xr_support
[Android editor] Add support for Android XR devices to the Godot XR Editor
2025-11-14 17:16:49 -06:00
e46c2ea3fa Merge pull request #112379 from bruvzg/tts64id
Make `utterance_id` 64-bit.
2025-11-14 14:23:17 -06:00
c36e846fb1 Merge pull request #112760 from Benjamin-Dobell/fix/android/gamepad-connect-on-startup
Android: Fix crash when gamepad connects immediately upon app startup
2025-11-14 14:23:16 -06:00
c6fe923e33 Merge pull request #108516 from KoBeWi/file_graveyard
Remove unnecessary cpp files after cleanup
2025-11-14 14:23:06 -06:00
353c871160 Add support for Android XR devices to the Godot XR Editor 2025-11-14 11:54:53 -08:00
585389af24 Fix crash when gamepad connects immediately upon Android app startup 2025-11-15 01:13:17 +11:00
cf0d2d724e Merge pull request #112585 from syntaxerror247/fix-ui-issue
Android: Fix root window shrinking when keyboard appears
2025-11-13 20:52:13 -06:00
ccf5be0dda Merge pull request #112679 from m4gr3d/add_front_door
[Android] Make use of activity-alias as the primary launcher mechanism
2025-11-13 20:52:11 -06:00
2ed51e00a1 Make use of activity-alias as the launcher mechanism for the Godot editor and the Godot app template 2025-11-13 10:17:43 -08:00
69401d6eb1 Fix crash when using ANGLE OpenGL on Windows. 2025-11-13 12:24:11 +03:00
04bc282ae7 Merge pull request #104851 from Ivorforce/tracy
Add `profiler` option to `SCons` builds, with support for `tracy` and `perfetto`.
2025-11-12 11:24:15 -06:00
5cb5eb59f9 Fix Chinese characters were not displayed correctly in DBusMessage
On OS with Chinese locale, you might receive the following message
when running an editor using the `--verbose` option:

```
ERROR: Error on D-Bus communication: æªæ	¾å°è¯·æ±ç
                                                         设置
   at: read_setting (platform/linuxbsd/freedesktop_portal_desktop.cpp:144)
```
2025-11-11 08:18:07 +08:00
9eaa7051ec Merge pull request #112534 from Noojuno/fix-windows-minimize-bug
Windows: Fix window_get_size_with_decorations returning an invalid size when restoring from minimize
2025-11-10 17:47:06 -06:00
3497a5dbf5 Windows: Fix window_get_size_with_decorations returning an invalid size when minimizing by storing previous value 2025-11-11 09:22:29 +13:00
2d86b69bf1 Merge pull request #112507 from Benjamin-Dobell/fix/android-assets-pck-loading
Android: Fix loading sparse `.pck` from `assets://`
2025-11-10 08:20:25 -06:00
57311e717a Merge pull request #112556 from m4gr3d/fix_editor_crash_on_exit
[Android editor] Fix editor crash on exit
2025-11-10 08:20:07 -06:00
941aff3c06 Android: Fix root window shrinks when keyboard shows 2025-11-09 20:07:43 +05:30
8c469be225 Fix editor crash on exit 2025-11-08 10:57:19 -08:00
b8a8f8b35a Allow localizing the application name with project translations 2025-11-08 13:06:55 +08:00
c3747884da Add some important profiling hooks. 2025-11-08 00:08:48 +01:00
e80194e31f Add profiler option to SCons builds.
Add `tracy` option to `profiler`. If set, a tracy profiling client will be injected into the Godot binary.

# Conflicts:
#	platform/linuxbsd/godot_linuxbsd.cpp
2025-11-08 00:08:45 +01:00
ee7722181f Merge pull request #112496 from bruvzg/nullcert
Fix "Unexpected NUL character" errors on Wine.
2025-11-07 10:32:33 -06:00
84365402f8 Android: Fixed assets:// access i.e. fixed .pck from assets:// 2025-11-07 23:42:22 +11:00
281c74550a Make utterance_id 64-bit. 2025-11-07 10:21:20 +02:00
c231c8c41d Fix "Unexpected NUL character" errors on Wine. 2025-11-07 08:08:12 +02:00
0cad83f7e7 Merge pull request #112398 from LanzaSchneider/patch-5
Fix compile error with android export plugin
2025-11-06 08:13:14 -06:00
2d7380c3ff Merge pull request #111493 from deralmas/racing-the-thread
Wayland: Defer event thread initialization to late initialization
2025-11-06 08:13:13 -06:00
8d6a76154e Fix compile error with android export plugin 2025-11-06 09:03:41 +08:00
62edbc2ae5 Merge pull request #112437 from mhilbrunner/android-buildtools-bump
Update Android build tools to version 35.0.1
2025-11-05 11:48:04 -06:00
613c9fb86f Improve rendering driver fallback on Windows. 2025-11-05 17:49:43 +03:00
5e07b74bf5 Update Android build tools to version 35.0.1 2025-11-05 14:29:56 +01:00
a6e7084b40 Merge pull request #112383 from bruvzg/mm_enter_spam
[macOS] Fix mouse enter events sent to wrong popup window.
2025-11-04 16:32:56 -06:00
f3c30408d4 Merge pull request #112344 from blueskythlikesclouds/d3d12-transparent-background-fix
Create HWND swap chain when window transparency is disabled on D3D12.
2025-11-04 16:32:48 -06:00
90cab74af9 Merge pull request #110248 from KoBeWi/unexpected_include_hell
Misc cleanup in EditorExportPlatform
2025-11-04 16:32:39 -06:00
38eefbab28 Merge pull request #112297 from UrbanHelix/borderless-border-bug
[Windows] Fix legacy border when toggling borderless while fullscreen
2025-11-04 16:32:37 -06:00
700aa5cee2 Merge pull request #112036 from MBCX/report-supported-api-android
Change API 21 references to API 24
2025-11-04 16:32:35 -06:00
c5e6fde0c7 Merge pull request #112142 from timothyqiu/motif-wm-hints
X11: Fix minimize/maximize buttons can't be hidden
2025-11-04 16:32:24 -06:00
03c544fb2b [macOS] Fix mouse enter events sent to wrong popup window. 2025-11-04 13:03:48 +02:00
4cc5177f6b Create HWND swap chain when window transparency is disabled on D3D12. 2025-11-03 17:36:55 +03:00
0a679a0a7f [windows] Added early return for when toggling borderless while fullscreen 2025-11-01 22:55:41 +01:00
0fdbf050e0 Merge pull request #112279 from bruvzg/l_sse42_err
[Linux] Add SSE4.2 support runtime check.
2025-11-01 19:07:07 +01:00
286e578b02 [Linux] Add SSE4.2 support runtime check. 2025-11-01 12:48:10 +02:00
ba3b024765 Merge pull request #110078 from bruvzg/emb_kmap
[macOS] Fix keyboard mapping init in embedded display server.
2025-10-31 09:23:34 -05:00
5c4f173a85 Merge pull request #110219 from bruvzg/mac_emb_focus_3
[macOS] Make embedded window focus behavior more similar to Windows/X11.
2025-10-31 09:23:26 -05:00
b0cb297cde Fix 64-bit integers being truncated to 32-bit in JNI 2025-10-30 22:57:53 +01:00
1c1c3200e4 Misc cleanup in EditorExportPlatform 2025-10-29 22:25:37 +01:00
48575336e8 X11: Fix minimize/maximize buttons can't be hidden 2025-10-29 19:37:23 +08:00
f7c9306453 Merge pull request #111326 from timothyqiu/win-dpi-scale
Fix editor auto display scale on Windows
2025-10-28 12:19:24 -05:00
3cd6b3f8c6 Merge pull request #111674 from bruvzg/pck_virt_addr_4
Update embedded PCK virtual address.
2025-10-28 10:15:35 -05:00