SDL/src/core
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
..
android Refactored code to send scancodes for an ASCII on-screen keyboard key 2022-06-29 17:26:09 -07:00
freebsd Updated copyright for 2022 2022-01-03 09:40:21 -08:00
gdk Windows GDK Support (#5830) 2022-06-27 10:19:39 -07:00
linux dbus: Use xdg-desktop-portal Inhibit when running under Flatpak or Snap 2022-08-29 06:30:40 -07:00
openbsd wscons: Make USB keyboard input layout independent 2022-02-18 09:30:04 -08:00
os2 os2, geniconv: default functions pointers to Uni*() API, 2022-01-21 11:50:40 +03:00
unix Updated copyright for 2022 2022-01-03 09:40:21 -08:00
windows Fix use after free when removing Windows audio device 2022-08-02 10:24:11 -04:00
winrt use SDL_InvalidParamError or SDL_assert instead of custom SDL_SetError 2022-01-28 20:40:19 -05:00