[Xfce4-commits] [apps/xfdashboard] 01/01: Fix handling signal "workspace-changed" for windows

noreply at xfce.org noreply at xfce.org
Thu Jul 26 15:17:40 CEST 2018


This is an automated email from the git hooks/post-receive script.

n   o   m   a   d       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfdashboard.

commit 35cbe7df8aca834bea546d5e12c71568c6d4900d
Author: Stephan Haller <nomad at froevel.de>
Date:   Thu Jul 26 15:17:05 2018 +0200

    Fix handling signal "workspace-changed" for windows
---
 libxfdashboard/live-window-simple.c | 4 +++-
 libxfdashboard/live-workspace.c     | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/libxfdashboard/live-window-simple.c b/libxfdashboard/live-window-simple.c
index 5846690..d428e5f 100644
--- a/libxfdashboard/live-window-simple.c
+++ b/libxfdashboard/live-window-simple.c
@@ -201,12 +201,14 @@ static void _xfdashboard_live_window_simple_on_state_changed(XfdashboardLiveWind
 
 /* Window's workspace has changed */
 static void _xfdashboard_live_window_simple_on_workspace_changed(XfdashboardLiveWindowSimple *self,
+																	XfdashboardWindowTrackerWorkspace *inWorkspace,
 																	gpointer inUserData)
 {
 	XfdashboardLiveWindowSimplePrivate	*priv;
 	XfdashboardWindowTrackerWindow		*window;
 
 	g_return_if_fail(XFDASHBOARD_IS_LIVE_WINDOW_SIMPLE(self));
+	g_return_if_fail(!inWorkspace || XFDASHBOARD_IS_WINDOW_TRACKER_WORKSPACE(inWorkspace));
 	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(inUserData));
 
 	priv=self->priv;
@@ -651,7 +653,7 @@ void xfdashboard_live_window_simple_set_window(XfdashboardLiveWindowSimple *self
 		/* Set up this actor and child actor by calling each signal handler now */
 		_xfdashboard_live_window_simple_on_geometry_changed(self, priv->window);
 		_xfdashboard_live_window_simple_on_state_changed(self, 0, priv->window);
-		_xfdashboard_live_window_simple_on_workspace_changed(self, priv->window);
+		_xfdashboard_live_window_simple_on_workspace_changed(self, NULL, priv->window);
 
 		/* Connect signal handlers */
 		g_signal_connect_swapped(priv->window, "geometry-changed", G_CALLBACK(_xfdashboard_live_window_simple_on_geometry_changed), self);
diff --git a/libxfdashboard/live-workspace.c b/libxfdashboard/live-workspace.c
index 92a0053..a71c462 100644
--- a/libxfdashboard/live-workspace.c
+++ b/libxfdashboard/live-workspace.c
@@ -326,7 +326,7 @@ static ClutterActor* _xfdashboard_live_workspace_create_and_add_window_actor(Xfd
 		/* Move existing window actor to new stacking position */
 		g_object_ref(actor);
 		clutter_actor_remove_child(CLUTTER_ACTOR(self), actor);
-		if(lastWindowActor)
+		if(lastWindowActor && lastWindowActor!=actor)
 		{
 			clutter_actor_insert_child_above(CLUTTER_ACTOR(self), actor, lastWindowActor);
 			XFDASHBOARD_DEBUG(self, ACTOR,

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list