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

marex at server.beryl-project.org marex at server.beryl-project.org
Mon Jan 1 15:38:41 CET 2007


Author: marex
Date: 2007-01-01 14:38:41 +0000 (Mon, 01 Jan 2007)
New Revision: 2225

Modified:
   branches/beryl-plugins/group-tabbed/group.c
   branches/beryl-plugins/group-tabbed/group.h
   branches/beryl-plugins/group-tabbed/init.c
Log:
group-tab-branch: Fixed some problems with constrain.. if anyone can tell me a reason why we needed lastWidth and lastHeight even if we have oldWidth and oldHeight revert this..


Modified: branches/beryl-plugins/group-tabbed/group.c
===================================================================
--- branches/beryl-plugins/group-tabbed/group.c	2007-01-01 14:14:51 UTC (rev 2224)
+++ branches/beryl-plugins/group-tabbed/group.c	2007-01-01 14:38:41 UTC (rev 2225)
@@ -727,19 +727,14 @@
 				}
 	
 				int nwidth, nheight;
-				if (constrainNewWindowSize(cw, gcw->lastWidth + rw, gcw->lastHeight + rh,
+				if (constrainNewWindowSize(cw, gcw->oldWidth + rw, gcw->oldHeight + rh,
 						&nwidth, &nheight)) {
-					rw = nwidth - gcw->lastWidth;
-					rh = nheight - gcw->lastHeight;
+					rw = nwidth - gcw->oldWidth;
+					rh = nheight - gcw->oldHeight;
 				}
 
 				groupEnqueueResizeNotify(cw, nx - WIN_X(cw), ny - WIN_Y(cw), rw, rh);
-
-				gcw->lastWidth = rw + WIN_WIDTH(cw);
-				gcw->lastHeight = rh + WIN_HEIGHT(cw);
 			}
-
-
 		}
 
 		gd->lastActiveGroup = gw->group;

Modified: branches/beryl-plugins/group-tabbed/group.h
===================================================================
--- branches/beryl-plugins/group-tabbed/group.h	2007-01-01 14:14:51 UTC (rev 2224)
+++ branches/beryl-plugins/group-tabbed/group.h	2007-01-01 14:38:41 UTC (rev 2225)
@@ -373,16 +373,12 @@
 	// for the tab bar
 	GroupTabBarSlot *slot;
 
-	// for scale notify...
+	// for resize notify...
 	int oldWidth;
 	int oldHeight;
 	int oldX;
 	int oldY;
 
-	// for grouped resize
-	int lastWidth;
-	int lastHeight;
-
 	GlowQuad *glowQuads;
 	GLushort oldOpacity;
 

Modified: branches/beryl-plugins/group-tabbed/init.c
===================================================================
--- branches/beryl-plugins/group-tabbed/init.c	2007-01-01 14:14:51 UTC (rev 2224)
+++ branches/beryl-plugins/group-tabbed/init.c	2007-01-01 14:38:41 UTC (rev 2225)
@@ -198,8 +198,8 @@
 	gw->inSelection = FALSE;
 
 	// for move/resize
-	gw->oldWidth = gw->lastWidth = WIN_WIDTH(w);
-	gw->oldHeight = gw->lastHeight = WIN_HEIGHT(w);
+	gw->oldWidth = WIN_WIDTH(w);
+	gw->oldHeight = WIN_HEIGHT(w);
 	gw->oldX = WIN_X(w);
 	gw->oldY = WIN_Y(w);
 




More information about the commits mailing list