SDL/src/core/linux
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
..
SDL_dbus.c dbus: Use xdg-desktop-portal Inhibit when running under Flatpak or Snap 2022-08-29 06:30:40 -07:00
SDL_dbus.h Updated copyright for 2022 2022-01-03 09:40:21 -08:00
SDL_evdev.c evdev: Support user-provided devices via SDL_EVDEV_DEVICES in non-udev mode. 2022-08-07 16:37:07 -07:00
SDL_evdev.h Updated copyright for 2022 2022-01-03 09:40:21 -08:00
SDL_evdev_capabilities.c Updated copyright for 2022 2022-01-03 09:40:21 -08:00
SDL_evdev_capabilities.h Updated copyright for 2022 2022-01-03 09:40:21 -08:00
SDL_evdev_kbd.c Updated copyright for 2022 2022-01-03 09:40:21 -08:00
SDL_evdev_kbd.h Updated copyright for 2022 2022-01-03 09:40:21 -08:00
SDL_evdev_kbd_default_accents.h Updated copyright for 2022 2022-01-03 09:40:21 -08:00
SDL_evdev_kbd_default_keymap.h Updated copyright for 2022 2022-01-03 09:40:21 -08:00
SDL_fcitx.c make SDL_SetTextInputRect take a pointer to const 2022-07-04 09:38:01 -07:00
SDL_fcitx.h make SDL_SetTextInputRect take a pointer to const 2022-07-04 09:38:01 -07:00
SDL_ibus.c make SDL_SetTextInputRect take a pointer to const 2022-07-04 09:38:01 -07:00
SDL_ibus.h make SDL_SetTextInputRect take a pointer to const 2022-07-04 09:38:01 -07:00
SDL_ime.c make SDL_SetTextInputRect take a pointer to const 2022-07-04 09:38:01 -07:00
SDL_ime.h make SDL_SetTextInputRect take a pointer to const 2022-07-04 09:38:01 -07:00
SDL_sandbox.c Add utility function to detect if SDL is inside a sandbox 2022-08-29 06:30:40 -07:00
SDL_sandbox.h Add utility function to detect if SDL is inside a sandbox 2022-08-29 06:30:40 -07:00
SDL_threadprio.c core: linux: Don't cache the RealtimeKit D-Bus connection 2022-08-14 06:59:18 -07:00
SDL_udev.c Updated copyright for 2022 2022-01-03 09:40:21 -08:00
SDL_udev.h Updated copyright for 2022 2022-01-03 09:40:21 -08:00