[totem] lib: Don't unhibit with '0' as the cookie
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] lib: Don't unhibit with '0' as the cookie
- Date: Thu, 10 Mar 2011 16:24:15 +0000 (UTC)
commit f6ddecb97e704ec659f32f22ae3876793ba79962
Author: Bastien Nocera <hadess hadess net>
Date: Thu Mar 10 16:23:50 2011 +0000
lib: Don't unhibit with '0' as the cookie
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 47f96df..aaa74bd 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);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]