1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-28 16:07:14 +00:00
Commit Graph

21 Commits

Author SHA1 Message Date
Will Thompson
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
Aaron Franke
3d1c9fd5de Move server files into their subfolders 2025-09-30 19:39:39 -07:00
Edward Moulsdale
12e97610a8 Add GDSOFTCLASS to six inheritors of Object 2025-09-21 16:22:29 +01:00
Pāvels Nadtočajevs
4310cb82b8 AccessKit integration for macOS, Linux, and Windows. 2025-04-08 20:25:47 +03:00
Thaddeus Crews
49fcd4ce46 Merge pull request #101546 from bruvzg/portal_color_picker
[Linux] Implement native color picker.
2025-03-17 10:52:29 -05:00
Pāvels Nadtočajevs
18f6c33d72 [DisplayServer] Implement get_accent_color on Linux. 2025-03-14 09:05:03 +02:00
Thaddeus Crews
324512e11c Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
Pāvels Nadtočajevs
05ca80632d [Linux] Implement native color picker. 2025-02-03 16:30:44 +02:00
Pāvels Nadtočajevs
86f56efbaa [FreeDesktop portal] Check for FileChooser and Settings interface availability instead of assuming it's always available. 2025-01-31 07:52:40 +02:00
Pāvels Nadtočajevs
e1f129cb52 Support MIME types in file dialog filters on macOS and Linux. 2025-01-04 22:05:35 +02:00
Pāvels Nadtočajevs
ed7b4f5c4a [Linux] Use safe IDs for native file dialog options. 2024-11-15 08:45:33 +02:00
bruvzg
67d6be30a0 [DBus] Process file dialog callback in the main event loop instead of using deferred call. 2024-04-23 19:32:35 +03:00
bruvzg
607cc27152 [Linux/Portal] Fix incorrect DBus connection usage. 2024-03-27 09:18:31 +02:00
bruvzg
ee53ae28df Add method to get "base" system UI color (macOS/Windows) and system theme change callback. 2024-02-13 18:38:53 +02:00
bruvzg
a8f521bcad [Native File Dialog] Add support for adding custom options to the dialogs.
Add support for adding custom options (checkboxes and optionboxes) to the dialogs (both native and built-in).
2024-01-24 15:00:31 +02:00
bruvzg
b52826bf55 Add error messages to the native menu and file dialogs callback. 2023-10-14 18:10:39 +03:00
bruvzg
43e4708dff [Native File Dialogs] Improve filter list handling, add selected filter to the callback. 2023-10-03 19:26:16 +03:00
bruvzg
2e1f48ff6e [Native File Dialogs] Refocus last focused window on close. 2023-08-24 09:34:58 +03:00
bruvzg
6cc314e0fa [Linux/Freedesktop] Implement native file selection dialog support. 2023-08-17 10:56:16 +03:00
Rémi Verschelde
d95794ec8a One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
Raul Santos
471c9c2969 Add support for system dark mode (Linux)
- Use `org.freedesktop.appearance color-scheme` to support system dark mode.
2022-09-02 16:49:21 +02:00