[mythtv-commits] mythtv commit: r24559 by mdean

mythtv at cvs.mythtv.org mythtv at cvs.mythtv.org
Tue May 11 02:35:32 UTC 2010


      Author: mdean
        Date: 2010-05-11 02:35:32 +0000 (Tue, 11 May 2010)
New Revision: 24559
   Changeset: http://svn.mythtv.org/trac/changeset/24559

Added:

   trunk/mythtv/libs/libmythui/screensaver-xdg.cpp
   trunk/mythtv/libs/libmythui/screensaver-xdg.h

Modified:

   trunk/mythtv/libs/libmythui/libmythui.pro
   trunk/mythtv/libs/libmythui/screensaver.cpp

Log:

Add support for xdg-screensaver from xdg-utils ( http://portland.freedesktop.org/wiki/ ).

This adds a new class ScreenSaverXDG that provides support for enabling/disabling an X11 screensaver using the xdg-screensaver script from xdg-utils.  xdg-screensaver basically implements all of the functionality MythTV had implemented in ScreenSaverX11 (and more)--it handles making sure any supported screensaver applications do not activate when not wanted and handles DPMS enabling/disabling--even if no screensaver applications are running.  Therefore, ScreenSaverXDG is significantly simpler than ScreenSaverX11.  xdg-screensaver currently supports xscreensaver, GNOME screenaver, KDE screensaver, and support for other screensavers can easily be added to the script.

The biggest benefit of using xdg-screensaver is that it is designed to allow safely disabling a screensaver application such that the screensaver state will be restored even in the event that the suspending application crashes.  If mythfrontend crashes after suspending the screensaver, xdg-screensaver will notice that the mythfrontend window no longer exists, so it will re-enable the screensaver.  Therefore, rather than poke the screensaver once every 50s during playback, as we do with xscreensaver and gnome-screensaver in ScreenSaverX11 (so we never have to disable the screensaver and risk leaving it in the wrong state after a crash), xdg-screensaver allows us to simply "suspend" the screensaver on playback startup and "resume" the screensaver on playback pause/exit/...  This means that users on underpowered systems or users affected by the GNOME screensaver issue that causes gnome-screensaver-command to take significant resources on every execution will no longer see playba
 ck issues every 50s or so if they have xdg-screensaver installed.

Refs #7291.  Fixes #8357 with slightly modified patch from Johnny Walker.  Thanks to Johnny for the patch and for the testing.






More information about the mythtv-commits mailing list