diff options
author | Bastien Nocera <hadess@hadess.net> | 2011-03-10 16:23:50 +0000 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2011-03-10 16:23:50 +0000 |
commit | f6ddecb97e704ec659f32f22ae3876793ba79962 (patch) | |
tree | cf2db7aedc6849ceb355e94cc44a6f0cb8ed1239 /lib | |
parent | a59bdebea7cda505b9d423bfc47d5711732b29cb (diff) | |
download | totem-f6ddecb97e704ec659f32f22ae3876793ba79962.tar.gz |
lib: Don't unhibit with '0' as the cookie
Diffstat (limited to 'lib')
-rw-r--r-- | lib/totem-scrsaver.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/totem-scrsaver.c b/lib/totem-scrsaver.c index 47f96dfb8..aaa74bd9c 100644 --- a/lib/totem-scrsaver.c +++ b/lib/totem-scrsaver.c @@ -181,14 +181,16 @@ screensaver_inhibit_dbus (TotemScrsaver *scr, on_inhibit_cb, scr); } else { - g_dbus_proxy_call (priv->gs_proxy, - "Uninhibit", - g_variant_new ("(u)", priv->cookie), - G_DBUS_CALL_FLAGS_NO_AUTO_START, - -1, - NULL, - on_uninhibit_cb, - scr); + if (priv->cookie > 0) { + g_dbus_proxy_call (priv->gs_proxy, + "Uninhibit", + g_variant_new ("(u)", priv->cookie), + G_DBUS_CALL_FLAGS_NO_AUTO_START, + -1, + NULL, + on_uninhibit_cb, + scr); + } } } |