All pastes #277055 Raw Edit

Stuff

public text v1 · immutable
·published 2006-12-12 21:37 UTC
rendered paste body
Index: beryl-core/include/beryl.h
===================================================================
--- beryl-core/include/beryl.h	(Revision 1701)
+++ beryl-core/include/beryl.h	(Arbeitskopie)
@@ -26,7 +26,7 @@
 #ifndef _BERYL_H
 #define _BERYL_H
 
-#define BERYL_VERSION 33
+#define BERYL_VERSION 34
 
 #define BERYL_ABI_INFO \
     BERYL_VERSION, \
@@ -1708,6 +1708,7 @@
     GLint stencilRef;
 
     Bool cleared;
+    Bool changingViewports;
 
     Bool lighting;
     Bool slowAnimations;
Index: beryl-core/src/screen.c
===================================================================
--- beryl-core/src/screen.c	(Revision 1701)
+++ beryl-core/src/screen.c	(Arbeitskopie)
@@ -3054,6 +3054,8 @@
 	if (!tx && !ty)
 		return;
 
+	s->changingViewports = TRUE;
+
 	s->x += tx;
 	s->y += ty;
 
@@ -3117,6 +3119,8 @@
 
 	if (sync)
 		setDesktopHints(s);
+
+	s->changingViewports = FALSE;
 }
 
 void moveWindowToViewportPosition(CompWindow * w, int x, Bool sync)
Index: beryl-group-tab/group.c
===================================================================
--- beryl-group-tab/group.c	(Revision 1701)
+++ beryl-group-tab/group.c	(Arbeitskopie)
@@ -463,27 +463,9 @@
 	WRAP(gs, w->screen, windowMoveNotify, groupWindowMoveNotify);
 	groupUpdatePosBuffer(w, WIN_X(w) + dx, WIN_Y(w) + dy, WIN_WIDTH(w), WIN_HEIGHT(w));
 
-	// workaround for viewports
-	Bool vpMove = FALSE;
-	if ((dx % w->screen->workArea.width == 0 && dx != 0) ||
-	    (dy % w->screen->workArea.height == 0 && dy != 0)) {
-		vpMove = TRUE;
-		
-		// If this window is tabbed but not visible, it shouldn't
-		// be affected by viewport moves, so move back to original position.
-		if(gw->inGroup && gw->group->tabbed &&
-		   gw->group->topTab != -1 &&
-		   TOP_TAB(gw->group)->id != w->id)	
-		{
-			UNWRAP(gs, w->screen, windowMoveNotify);
-			moveWindow(w, -dx, -dy, TRUE, FALSE);
-			WRAP(gs, w->screen, windowMoveNotify, groupWindowMoveNotify);
-		}
-	}
-
 	if (!gw->inGroup ||
 	    gw->group->animationSteps ||
-	    vpMove ||
+	    w->screen->changingViewports ||
 	    IPCS_GetBoolND(IPCS_OBJECT(w), "SHOWDESKTOP_MOVE", FALSE) ||
 	    IPCS_GetBoolND(IPCS_OBJECT(w->screen->display), "SCALE_INIT", FALSE) ||
 	    !gs->opt[GROUP_SCREEN_OPTION_MOVE].value.b ||