Permalink
Browse files

Remove support for GNOME screensaver.

The GNOME developers broke the "legacy" inhibit support (inhibit via
gnome-screensaver-command) a couple years ago and seem to have no
intention of ever fixing it, instead focusing on forcing every single
media player application in the world (or other applications needing to
provide hints to the screensaver) to add D-Bus-based inhibit requests
using their GNOME-specific D-Bus API (see
https://bugzilla.gnome.org/show_bug.cgi?id=579430 ).  (Of course, this
approach would then mean all of those applications must also implement
code to add D-Bus-based inhibit requests using the KDE-specific D-Bus
API to support users running KDE screensaver, and ...  And, as a point
of note, KDE has taken the same approach and has the same expectation of
applications.)

Therefore, this patch removes the GNOME screensaver legacy inhibit
support so that users of GNOME screensaver, like users of KDE
screensaver, will fall back to getting DPMS-based screensaver control.
If GNOME screensaver, like KDE screensaver, actually takes the hint when
the DPMS state is changed, this should allow users to once again run
GNOME screensaver (which has been unsupported since GNOME broke
gnome-screensaver-command --poke) without the screensaver activating
during playback.  If GNOME screensaver doesn't take a clue from the DPMS
state, GNOME screensaver should be fixed.

This change does not purport to provide support for users who run GNOME
screensaver.  This simply removes the code that calls a broken program
that GNOME has said they will not fix.
  • Loading branch information...
sphery committed Jan 31, 2012
1 parent bea7f73 commit 5e13d41a8eea7faa030a07c9d19ce5efce5dc925
Showing with 2 additions and 18 deletions.
  1. +2 −18 mythtv/libs/libmythui/screensaver-x11.cpp
@@ -30,7 +30,7 @@ class ScreenSaverX11Private
public:
ScreenSaverX11Private(ScreenSaverX11 *outer) :
m_dpmsaware(false), m_dpmsdeactivated(false),
- m_xscreensaverRunning(false), m_gscreensaverRunning(false),
+ m_xscreensaverRunning(false),
m_dpmsenabled(false),
m_timeoutInterval(-1), m_resetTimer(NULL),
m_display(NULL)
@@ -40,9 +40,6 @@ class ScreenSaverX11Private
m_xscreensaverRunning =
myth_system("xscreensaver-command -version >&- 2>&-",
flags) == 0;
- m_gscreensaverRunning =
- myth_system("gnome-screensaver-command --help >&- 2>&-",
- flags) == 0;
if (IsScreenSaverRunning())
{
@@ -52,9 +49,6 @@ class ScreenSaverX11Private
outer, SLOT(resetSlot()));
if (m_xscreensaverRunning)
LOG(VB_GENERAL, LOG_INFO, LOC + "XScreenSaver support enabled");
- if (m_gscreensaverRunning)
- LOG(VB_GENERAL, LOG_INFO, LOC +
- "Gnome screen saver support enabled");
}
m_display = OpenMythXDisplay();
@@ -101,7 +95,7 @@ class ScreenSaverX11Private
bool IsScreenSaverRunning(void) const
{
- return m_xscreensaverRunning || m_gscreensaverRunning;
+ return m_xscreensaverRunning;
}
bool IsDPMSEnabled(void) const { return m_dpmsenabled; }
@@ -209,15 +203,6 @@ class ScreenSaverX11Private
kMSDontDisableDrawing |
kMSRunBackground);
}
- if (m_gscreensaverRunning)
- {
- LOG(VB_PLAYBACK, LOG_INFO, LOC +
- "Calling gnome-screensaver-command --poke");
- myth_system("gnome-screensaver-command --poke >&- 2>&- &",
- kMSDontBlockInputDevs |
- kMSDontDisableDrawing |
- kMSRunBackground);
- }
m_last_deactivated = current_time;
}
}
@@ -240,7 +225,6 @@ class ScreenSaverX11Private
bool m_dpmsaware;
bool m_dpmsdeactivated; ///< true if we disabled DPMS
bool m_xscreensaverRunning;
- bool m_gscreensaverRunning;
BOOL m_dpmsenabled;
int m_timeoutInterval;

0 comments on commit 5e13d41

Please sign in to comment.