[Xfce4-commits] <xfce4-wmdock-plugin:master> Fixed some strange bugs in the dockapp movement (panel off mode).

Andre Ellguth noreply at xfce.org
Mon Nov 4 13:36:19 CET 2013


Updating branch refs/heads/master
         to 62926768568bf222739c07aebc2480f4895a36b2 (commit)
       from 4804e72540e692132c9552c60a7fcdd3844f85eb (commit)

commit 62926768568bf222739c07aebc2480f4895a36b2
Author: Andre Ellguth <andre at ellguth.com>
Date:   Thu Sep 19 18:55:17 2013 +0200

    Fixed some strange bugs in the dockapp movement (panel off mode).

 panel-plugin/dockapp.c |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/panel-plugin/dockapp.c b/panel-plugin/dockapp.c
index a8d6533..4ba8f43 100644
--- a/panel-plugin/dockapp.c
+++ b/panel-plugin/dockapp.c
@@ -260,6 +260,8 @@ static gboolean wmdock_replace_tile_dummy(DockappNode *dapp)
 			for(i = 0; i < GLUE_MAX; i++) {
 				if(_dapp->glue[i] && !g_strcmp0(_dapp->glue[i]->name, DOCKAPP_DUMMY_TITLE)) {
 					g_list_foreach(wmdock->dapps, (GFunc) wmdock_remove_anchor_dockapp, dapp);
+					_dapp->glue[i] = dapp;
+					debug("dockapp.c: Connect `%s' to `%s' with glue.", dapp->name, _dapp->name);
 					for(j = 0; j < GLUE_MAX; j++) {
 						if(parent) {
 							if(parent == dapp->glue[j])
@@ -267,16 +269,19 @@ static gboolean wmdock_replace_tile_dummy(DockappNode *dapp)
 
 							/* Transfer all connected DockApps to the parent. */
 							_parent = parent;
-							while(_parent->glue[j]) {
+							while(_parent->glue[j] && _parent->glue[j] != dapp->glue[j]) {
 								_parent = _parent->glue[j];
 							}
+							if(dapp->glue[j] && _parent->glue[j] == dapp->glue[j]) {
+								debug("dockapp.c: Parent_Connect `%s' to `%s' with glue.", dapp->glue[j]->name, _parent->name);
+								continue;
+							}
 							_parent->glue[j] = dapp->glue[j];
 						}
 						/* Remove old anchor itself or all anchors it was the first anchor. */
 						dapp->glue[j] = NULL;
 					}
-					_dapp->glue[i] = dapp;
-					debug("dockapp.c: Connect `%s' to `%s' with glue.", dapp->name, _dapp->name);
+
 					return TRUE;
 				}
 			}


More information about the Xfce4-commits mailing list