[Xfce4-commits] <xfdesktop:xfce-4.10> Backdrop stops cycling (Bug #8962)

Jérôme Guelfucci noreply at xfce.org
Sat Mar 2 18:06:02 CET 2013


Updating branch refs/heads/xfce-4.10
         to 9916e6e0068523c058c9c29ca437b6f41d69cd40 (commit)
       from a93ac3f087f9299de6308a59bb9cb46549b2a38a (commit)

commit 9916e6e0068523c058c9c29ca437b6f41d69cd40
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Sat Dec 22 10:13:41 2012 +0300

    Backdrop stops cycling (Bug #8962)
    
    Fix the backdrop_timer callback function to return TRUE to keep
    the cycle going.

 src/xfce-backdrop.c |   16 +++++++++++++---
 src/xfce-desktop.c  |    2 ++
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/src/xfce-backdrop.c b/src/xfce-backdrop.c
index 600d7fd..b07492f 100644
--- a/src/xfce-backdrop.c
+++ b/src/xfce-backdrop.c
@@ -35,6 +35,8 @@
 #include <gdk-pixbuf/gdk-pixbuf.h>
 #include <gdk-pixbuf/gdk-pixdata.h>
 
+#include <libxfce4util/libxfce4util.h> /* for DBG/TRACE */
+
 #include "xfce-backdrop.h"
 #include "xfce-desktop-enum-types.h"
 #include "xfdesktop-common.h"  /* for DEFAULT_BACKDROP */
@@ -52,7 +54,7 @@ static void xfce_backdrop_get_property(GObject *object,
                                        guint property_id,
                                        GValue *value,
                                        GParamSpec *pspec);
-static void xfce_backdrop_timer(XfceBackdrop *backdrop);
+static gboolean xfce_backdrop_timer(XfceBackdrop *backdrop);
 
 struct _XfceBackdropPriv
 {
@@ -831,12 +833,16 @@ xfce_backdrop_get_saturation(XfceBackdrop *backdrop)
     return backdrop->priv->saturation;
 }
 
-static void
+static gboolean
 xfce_backdrop_timer(XfceBackdrop *backdrop)
 {
-    g_return_if_fail(XFCE_IS_BACKDROP(backdrop));
+    TRACE("entering");
+
+    g_return_val_if_fail(XFCE_IS_BACKDROP(backdrop), FALSE);
 
     g_signal_emit(G_OBJECT(backdrop), backdrop_signals[BACKDROP_CYCLE], 0);
+
+    return TRUE;
 }
 
 /**
@@ -854,6 +860,8 @@ xfce_backdrop_set_cycle_timer(XfceBackdrop *backdrop, guint cycle_timer)
 {
     g_return_if_fail(XFCE_IS_BACKDROP(backdrop));
 
+    TRACE("entering, cycle_timer = %d", cycle_timer);
+
     if(cycle_timer > G_MAXUSHORT)
         cycle_timer = G_MAXUSHORT;
 
@@ -885,6 +893,8 @@ xfce_backdrop_set_cycle_backdrop(XfceBackdrop *backdrop,
 {
     g_return_if_fail(XFCE_IS_BACKDROP(backdrop));
 
+    TRACE("entering, cycle_backdrop ? %s", cycle_backdrop == TRUE ? "TRUE" : "FALSE");
+
     if(backdrop->priv->cycle_backdrop != cycle_backdrop) {
         backdrop->priv->cycle_backdrop = cycle_backdrop;
         /* Start or stop the backdrop changing */
diff --git a/src/xfce-desktop.c b/src/xfce-desktop.c
index 493795c..526ecf7 100644
--- a/src/xfce-desktop.c
+++ b/src/xfce-desktop.c
@@ -385,6 +385,8 @@ backdrop_cycle_cb(XfceBackdrop *backdrop, gpointer user_data)
 {
     const gchar* backdrop_list;
 
+    TRACE("entering");
+
     g_return_if_fail(XFCE_IS_BACKDROP(backdrop));
 
     backdrop_list = xfce_backdrop_get_list(backdrop);


More information about the Xfce4-commits mailing list