| Summary: | Screensaver inhibition broken in GNOME 3 | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Bastien Nocera <bugzilla> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | bugzilla, icculus |
| Version: | HG 2.1 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: |
0001-X11-Add-support-for-fd.o-Idle-Inhibition.patch
0001-X11-Add-support-for-fd.o-Idle-Inhibition.patch |
||
|
Description
Bastien Nocera
2013-10-21 15:00:05 UTC
Created attachment 1389 [details] 0001-X11-Add-support-for-fd.o-Idle-Inhibition.patch Add support for the freedesktop.org Idle Inhibition specification, as per: http://people.freedesktop.org/~hadess/idle-inhibition-spec/ This makes screensaver inhibition work with GNOME 3 and other desktop environments that implement the specification. Do you know if there's a way to decide if the system has org.freedesktop.ScreenSaver support (without having to parse a bunch of XML through the D-Bus introspection API)? Ideally, I'd like to know at runtime if we should use the old way or the new way, instead of blasting out both and hoping for the best. Ideally, we don't decide what we should do based on whether session_cookie is zero. I don't know if that's actually solvable. Otherwise, this patch looks pretty good. --ryan. (In reply to Ryan C. Gordon from comment #2) > Do you know if there's a way to decide if the system has > org.freedesktop.ScreenSaver support (without having to parse a bunch of XML > through the D-Bus introspection API)? You don't need to parse XML. The D-Bus call will simply fail if there's no such interface implemented. I can make SDL_dbus_screensaver_inhibit() return a boolean and only "tickle" if that failed. > Ideally, I'd like to know at runtime if we should use the old way or the new > way, instead of blasting out both and hoping for the best. Ideally, we don't > decide what we should do based on whether session_cookie is zero. > > I don't know if that's actually solvable. Otherwise, this patch looks pretty > good. If the above is OK with you, I can make the changes. Created attachment 1518 [details]
0001-X11-Add-support-for-fd.o-Idle-Inhibition.patch
The only thing I'm missing is a good application description. We currently have "My SDL application" which I guess is better than nothing, but another identifier of any sort would be useful.
This patch is now https://hg.libsdl.org/SDL/rev/fee216d949e3, thanks! I'm planning to add an application metadata API at some point, which will help with the "My SDL application" string. For now, it's good enough. --ryan. |