[beryl-commits] r2247 - branches/beryl-plugins/group-tabbed

marex at server.beryl-project.org marex at server.beryl-project.org
Tue Jan 2 00:51:58 CET 2007


Author: marex
Date: 2007-01-01 23:51:57 +0000 (Mon, 01 Jan 2007)
New Revision: 2247

Modified:
   branches/beryl-plugins/group-tabbed/group.c
   branches/beryl-plugins/group-tabbed/tab.c
Log:
group-tab-branch: Good news everyone: D&D works now! :D


Modified: branches/beryl-plugins/group-tabbed/group.c
===================================================================
--- branches/beryl-plugins/group-tabbed/group.c	2007-01-01 23:16:46 UTC (rev 2246)
+++ branches/beryl-plugins/group-tabbed/group.c	2007-01-01 23:51:57 UTC (rev 2247)
@@ -533,9 +533,7 @@
 						if (XPointInRegion (slot->region, event->xbutton.x_root, 
 								    event->xbutton.y_root)) {
 							if (group->topTab == slot) {
-								printf("Set!\n");
 								group->tabBar->draggedSlot = slot;
-								group->tabBar->state = TabBarPermanentOn;
 							} else
 								groupChangeTab(slot);
 						}
@@ -593,7 +591,6 @@
 			for(group = gd->groups; group; group = group->next) {
 				if (group->tabBar && group->tabBar->draggedSlot)
 				{
-					printf("Release!\n");
 					int mouseX, mouseY;
 					groupGetCurrentMousePosition(d, &mouseX, &mouseY);
 					

Modified: branches/beryl-plugins/group-tabbed/tab.c
===================================================================
--- branches/beryl-plugins/group-tabbed/tab.c	2007-01-01 23:16:46 UTC (rev 2246)
+++ branches/beryl-plugins/group-tabbed/tab.c	2007-01-01 23:51:57 UTC (rev 2247)
@@ -807,7 +807,7 @@
 {
 	GroupTabBarSlot *next = prevSlot->next;
 
-	if(next) {
+	if (next) {
 		slot->next = next;
 		next->prev = slot;
 	} else {
@@ -874,20 +874,19 @@
 	else
 		bar->revSlots = prev;
 
+	slot->prev = NULL;
+	slot->next = NULL;
+
 	bar->nSlots--;
 
 	CompWindow *w = slot->window;
 	GROUP_WINDOW(w);
+
 	//Moving bar->region->extents.x1 / x2 as minX1 / maxX2 will work,
 	//because the tab-bar got thiner now, so (bar->region->extents.x1 + bar->region->extents.x2) / 2
 	//Won't cause the new x1 / x2 to be outside the original region.
 	groupRecalcTabBarPos(gw->group, (bar->region->extents.x1 + bar->region->extents.x2) / 2,
 			     bar->region->extents.x1, bar->region->extents.x2);
-	
-	if(gw->group->topTab == slot)
-		gw->group->topTab = NULL;
-	if(gw->group->prevTopTab == slot)
-		gw->group->prevTopTab = NULL;
 }
 
 /*
@@ -903,6 +902,14 @@
 	if (slot->name)
 		free(slot->name);
 
+	CompWindow *w = slot->window;
+	GROUP_WINDOW(w);
+
+	if(gw->group->topTab == slot)
+		gw->group->topTab = NULL;
+	if(gw->group->prevTopTab == slot)
+		gw->group->prevTopTab = NULL;
+
 	free(slot);
 }
 




More information about the commits mailing list