[gthumb] fixed run-time warning when uninhibiting the screensaver
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] fixed run-time warning when uninhibiting the screensaver
- Date: Wed, 28 Mar 2012 20:17:05 +0000 (UTC)
commit 6f4cefc24a70b52eb5aae9d293f22204f81532a7
Author: Paolo Bacchilega <paobac src gnome org>
Date: Wed Mar 28 21:41:32 2012 +0200
fixed run-time warning when uninhibiting the screensaver
don't call uninhibit with the same cookie more then once
gthumb/gth-screensaver.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gthumb/gth-screensaver.c b/gthumb/gth-screensaver.c
index 4053cca..07867e3 100644
--- a/gthumb/gth-screensaver.c
+++ b/gthumb/gth-screensaver.c
@@ -36,7 +36,7 @@ enum {
struct _GthScreensaverPrivate {
char *app_id;
- guint cookie;
+ guint32 cookie;
GDBusProxy *proxy;
};
@@ -262,10 +262,13 @@ org_gnome_session_manager_uninhibit_ready_cb (GObject *source_object,
void
gth_screensaver_uninhibit (GthScreensaver *self)
{
- GError *error = NULL;
+ GError *error = NULL;
+ guint32 cookie;
if (self->priv->cookie == 0)
return;
+ cookie = self->priv->cookie;
+ self->priv->cookie = 0;
_gth_screensaver_create_sm_proxy (self, &error);
@@ -278,7 +281,7 @@ gth_screensaver_uninhibit (GthScreensaver *self)
g_object_ref (self);
g_dbus_proxy_call (self->priv->proxy,
"Uninhibit",
- g_variant_new ("(u)", self->priv->cookie),
+ g_variant_new ("(u)", cookie),
G_DBUS_CALL_FLAGS_NONE,
G_MAXINT,
NULL,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]