On Wed, Apr 26, 2006 at 04:08:32PM +0200, Attila Kinali wrote:
On Wed, 26 Apr 2006 15:50:17 +0200 Piotr Kaczuba <pepe@attika.ath.cx> wrote:
+#ifdef HAVE_DBUS_GLIB + gnome_screensaver_enable(); +#endif + } if (kdescreensaver_was_running && stop_xscreensaver) { system @@ -1738,8 +1746,12 @@ allow_exp); } // turning off screensaver - if (stop_xscreensaver) + if (stop_xscreensaver) { xscreensaver_disable(mDisplay); +#ifdef HAVE_DBUS_GLIB + gnome_screensaver_disable(); +#endif + }
Shouldn't you check whether the screensaver is actualy running before disabling it, to prevent enabling it when it wasnt enabled?
And how does your patch behave, when gnome is installed, but not running ?
Actually, I'm sending an InhibitActivation message to the screensaver, it's not a real disable. So, when it's not enabled, InhibitActivation doesn't do anything. Similarly, AllowActivation is sent when stopping playing: it won't enable/start the screensaver when it isn't running. See the last question at http://live.gnome.org/GnomeScreensaver/FrequentlyAskedQuestions, which gives some examples of how to do it. Attached there is the proper patch, as the previous one has two files missing.