SDL/src
Ludovico de Nittis 3c78ba570b dbus: Use xdg-desktop-portal Inhibit when running under Flatpak or Snap
In order to inhibit the screen saver, SDL currently uses
`org.freedesktop.ScreenSaver.Inhibit()` and, as a fallback, a protocol
specific method for X11 or Wayland.

Accessing `org.freedesktop.ScreenSaver` is usually not allowed when
inside a sandbox like Flatpak, unless the permission has been explicitly
granted to the application.

Another issue is that the Wayland protocol "Idle inhibit" is relatively
new and not yet widely adopted. For example Mutter still doesn't support
it.

For those reasons, when running under Flatpak or Snap, we should try to
inhibit the screen saver by using xdg-desktop-portal instead. This
should give us an higher chance of success.

Fixes: https://github.com/libsdl-org/SDL/issues/6075

Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
2022-08-29 06:30:40 -07:00
..
atomic Proposing exposing as public api the various arch dependent 2022-08-04 08:47:39 -07:00
audio Add more valid configurations to PS2 audio driver 2022-08-27 18:34:33 -07:00
core dbus: Use xdg-desktop-portal Inhibit when running under Flatpak or Snap 2022-08-29 06:30:40 -07:00
cpuinfo Use proper header for OpenBSD PPC CPU detection 2022-06-27 11:01:34 -07:00
dynapi Re-added the CRC to the joystick guid 2022-08-27 19:00:31 -07:00
events Added a hint SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE to control whether to use system mouse acceleration on raw relative motion. 2022-08-22 16:48:09 -07:00
file Xbox GDKX support (#5869) 2022-07-01 13:59:14 -07:00
filesystem Fixed some Xcode warnings 2022-07-17 09:07:04 -07:00
haptic Xbox GDKX support (#5869) 2022-07-01 13:59:14 -07:00
hidapi Add utility function to detect if SDL is inside a sandbox 2022-08-29 06:30:40 -07:00
joystick Add utility function to detect if SDL is inside a sandbox 2022-08-29 06:30:40 -07:00
libm Add some PS2 flags 2022-06-15 15:15:26 -07:00
loadso use SDL_InvalidParamError or SDL_assert instead of custom SDL_SetError 2022-01-28 20:40:19 -05:00
locale Vita: add SDL_GetPreferredLocales support 2022-03-29 15:02:21 -07:00
main Disable fileXio and patch fio 2022-08-24 12:23:56 -07:00
misc Xbox GDKX support (#5869) 2022-07-01 13:59:14 -07:00
power Don't fail to get battery status if the upower refresh call fails 2022-02-04 14:02:44 -08:00
render Adding SDL_GetWindowSizeInPixels for window size in pixels (#6112) 2022-08-24 11:25:13 -07:00
sensor Removed problematic call to ISensor_SetEventSink() 2022-03-17 10:01:13 -07:00
stdlib Fixed potential uninitialized variable usage 2022-08-12 20:51:28 -07:00
test test: Fixed wrong arguments to SDL_SetWindowFullscreen. 2022-08-09 09:29:30 -04:00
thread Xbox GDKX support (#5869) 2022-07-01 13:59:14 -07:00
timer Xbox GDKX support (#5869) 2022-07-01 13:59:14 -07:00
video Fix candidate list size for Windows IME 2022-08-28 06:27:24 -07:00
SDL.c Xbox GDKX support (#5869) 2022-07-01 13:59:14 -07:00
SDL_assert.c hide SDL_GenerateAssertionReport in case SDL_ASSERT_LEVEL is 0 2022-07-25 14:26:46 -07:00
SDL_assert_c.h Updated copyright for 2022 2022-01-03 09:40:21 -08:00
SDL_dataqueue.c Updated copyright for 2022 2022-01-03 09:40:21 -08:00
SDL_dataqueue.h Updated copyright for 2022 2022-01-03 09:40:21 -08:00
SDL_error.c Fix SIGSEV in SDL_error (After removing the limit on the size of the SDL error message) (see #5795) 2022-06-28 09:46:12 +02:00
SDL_error_c.h Removed the limit on the size of the SDL error message 2022-06-27 16:59:50 -07:00
SDL_guid.c Refactoring: move GUID operations out of Joystick 2022-06-04 17:22:13 -07:00
SDL_hints.c Added SDL_ResetHint() to reset a hint to the default value 2022-08-10 08:01:24 -07:00
SDL_hints_c.h Updated copyright for 2022 2022-01-03 09:40:21 -08:00
SDL_internal.h Fix enabling SDL_DYNAMIC_API in OpenWatcom builds 2022-05-19 20:11:10 +03:00
SDL_list.c Add SDL_list.c/h 2022-04-01 08:01:44 +02:00
SDL_list.h Add SDL_list.c/h 2022-04-01 08:01:44 +02:00
SDL_log.c android: Add missing entries to SDL_category_prefixes table. 2022-07-05 17:50:19 -07:00
SDL_log_c.h Added declaration of SDL_LogInit() and SDL_LogQuit() 2022-04-28 15:01:34 -07:00
SDL_utils.c Fixed declaration-after-statement warning 2022-07-18 07:31:23 -07:00
SDL_utils_c.h Fixed comment (thanks @pionere!) 2022-07-18 07:18:56 -07:00