We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5490 - [PATCH] Implement inhibiting screensaver on Wayland
Summary: [PATCH] Implement inhibiting screensaver on Wayland
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.1
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-21 03:34 UTC by Cameron Gutman
Modified: 2021-01-23 17:37 UTC (History)
0 users

See Also:


Attachments
Patch (11.52 KB, patch)
2021-01-21 03:37 UTC, Cameron Gutman
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cameron Gutman 2021-01-21 03:34:45 UTC
SDL doesn't currently support inhibiting the screensaver on Wayland. This causes the display to go to sleep while playing games with a gamepad on the Wayland backend.

To suspend the screensaver, we'll support both the org.freedesktop.ScreenSaver D-Bus API (like the X11 backend does) and the idle_inhibit_unstable_v1 Wayland protocol for compatibility with most Wayland compositors.
Comment 1 Cameron Gutman 2021-01-21 03:37:29 UTC
Created attachment 4683 [details]
Patch

Tested org.freedesktop.ScreenSaver on GNOME 3.38.3 (which doesn't support idle_inhibit_unstable_v1).

Tested idle_inhibit_unstable_v1 and org.freedesktop.ScreenSaver on KDE Plasma 5.20.8.
Comment 2 Cameron Gutman 2021-01-21 03:39:11 UTC
FYI: The SDL_DBus_Quit() code (and accompanying FIXME) was copied from the X11 backend.
Comment 3 Sam Lantinga 2021-01-23 17:37:18 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL/rev/d4b8ebda48c4