Index: beryl-plugins/src/rotate.c =================================================================== --- beryl-plugins/src/rotate.c (Revision 1302) +++ beryl-plugins/src/rotate.c (Arbeitskopie) @@ -631,11 +631,11 @@ steps = stepsCount = 1; chunk = amount / (float)steps; - if (performZooming && rs->zoomBeforeRotate && rs->rotating) + if (performZooming && rs->zoomBeforeRotate && rs->rotating) { steps = stepsCount; - while (steps--) + while (steps--) { float dt, adjust, tamount; @@ -711,8 +711,8 @@ rs->xVelocity = 0.0f; rs->yVelocity = 0.0f; - //if de-scaling, don't end the rotation until scale is finished - if (fabs (rs->yrot) < 0.1f && !otherScreenGrabExist (s, "rotate", "move", "switcher", "cube", 0)) + //if de-scaling, don't end the rotation until scale is finished + if ((fabs (rs->yrot) < 0.1f) && !otherScreenGrabExist (s, "scale", 0)) { float xrot; int tx; @@ -1035,7 +1035,7 @@ if (rs->rotateHandle && rs->grabWindow) { - if (otherScreenGrabExist (s, "rotate", "move", 0)) + if (otherScreenGrabExist (s, "rotate", 0)) return FALSE; } else @@ -1146,8 +1146,7 @@ if (s->hsize < 2) return FALSE; - //allow rotation to proceed if we're de-scaling - if (otherScreenGrabExist (s, "rotate", "move", "switcher", "cube", "scale", 0)) + if (otherScreenGrabExist (s, "switcher", "cube", 0)) return FALSE; direction = getIntOptionNamed (option, nOption, "direction", 0); @@ -1205,7 +1204,7 @@ ROTATE_SCREEN (s); - if (otherScreenGrabExist (s, "rotate", "move", "switcher", "cube", 0)) + if (otherScreenGrabExist (s, "move", "switcher", "cube", 0)) return FALSE; direction = getIntOptionNamed (option, nOption, "direction", 0); @@ -1641,7 +1640,7 @@ rs->moveTo = 0.0f; rs->slow = FALSE; - if (otherScreenGrabExist (s, "rotate", "move", 0)) + if (otherScreenGrabExist (s, "rotate", 0)) return FALSE; warpX = s->display->pointerX + s->width; @@ -1686,7 +1685,7 @@ rs->moveTo = 0.0f; rs->slow = FALSE; - if (otherScreenGrabExist (s, "rotate", "move", 0)) + if (otherScreenGrabExist (s, "rotate", 0)) return FALSE; warpX = s->display->pointerX - s->width; @@ -1729,31 +1728,21 @@ CompOption o[4]; ROTATE_DISPLAY (s->display); + ROTATE_SCREEN (s); if (s->hsize < 2) return; - if (otherScreenGrabExist (s, "rotate", "move", 0)) + if (otherScreenGrabExist (s, "rotate", 0)) return; if (state & CompActionStateInitEdgeDnd) { if (!rd->opt[ROTATE_DISPLAY_OPTION_EDGEFLIP_DND].value.b) return; - - if (otherScreenGrabExist (s, "rotate", 0)) - return; } - else if (otherScreenGrabExist (s, "rotate", 0)) + else if (rd->opt[ROTATE_DISPLAY_OPTION_EDGEFLIP_WINDOW].value.b && rs->grabWindow) //if (otherScreenGrabExist (s, "rotate", 0)) { - ROTATE_SCREEN (s); - - if (!rd->opt[ROTATE_DISPLAY_OPTION_EDGEFLIP_WINDOW].value.b) - return; - - if (!rs->grabWindow) - return; - /* bail out if window is horizontally maximized or fullscreen */ if (rs->grabWindow->state & (CompWindowStateMaximizedHorzMask | CompWindowStateFullscreenMask)) @@ -2184,22 +2173,11 @@ { int dx; - //allow rotation to proceed if we're de-scaling - if (otherScreenGrabExist (s, "rotate", "switcher", "cube", "scale", 0)) + if (otherScreenGrabExist (s, "rotate", "switcher", "cube", 0)) break; - ROTATE_SCREEN (s); dx = event->xclient.data.l[0] / s->width - s->x; - - //if already moving, modify motion in progress - if (rs->moving) { - if (dx > (s->hsize + 1) / 2) - dx -= s->hsize; - else if (dx < -(s->hsize + 1) / 2) - dx += s->hsize; - rs->moveTo = (360.0f / s->hsize) * dx; - } - else if (dx) + if (dx) { Window win; int i, x, y; Index: beryl-plugins/src/plane.c =================================================================== --- beryl-plugins/src/plane.c (Revision 1302) +++ beryl-plugins/src/plane.c (Arbeitskopie) @@ -203,11 +203,11 @@ CompScreen *screen = data; PLANE_SCREEN (screen); - //wait until de-scale is finished before setting viewport - if (otherScreenGrabExist (screen, "plane", "switcher", "cube", 0)) { - ps->timeout_handle = compAddTimeout (20, end_move, screen); - return FALSE; - } + //wait until de-scale is finished before setting viewport + if (otherScreenGrabExist (screen, "scale", 0)) { + ps->timeout_handle = compAddTimeout (20, end_move, screen); + return FALSE; + } moveScreenViewport (screen, -ps->dest_x, -ps->dest_y, TRUE); @@ -554,11 +554,10 @@ if (!s) break; - //allow movement to proceed if we're de-scaling - if (otherScreenGrabExist (s, "plane", "switcher", "cube", "scale", 0)) + if (otherScreenGrabExist (s, "plane", "switcher", "cube", 0)) break; - PLANE_SCREEN (s); + PLANE_SCREEN (s); dx = event->xclient.data.l[0] / s->width - s->x - ps->dest_x; dy = event->xclient.data.l[1] / s->height - s->y - ps->dest_y; @@ -924,9 +923,9 @@ if (!ps) return FALSE; - ps->timeout_handle = 0; ps->dest_x = 0; ps->dest_y = 0; + ps->timeout_handle = 0; planeScreenInitOptions (ps); Index: beryl-plugins/src/scale.c =================================================================== --- beryl-plugins/src/scale.c (Revision 1302) +++ beryl-plugins/src/scale.c (Arbeitskopie) @@ -608,6 +608,9 @@ { SCALE_SCREEN (s); + if (!ss->selectedWindow) + return; + ss->selectedWindow = 0; XEvent xev; Index: beryl-core/src/screen.c =================================================================== --- beryl-core/src/screen.c (Revision 1302) +++ beryl-core/src/screen.c (Arbeitskopie) @@ -2372,7 +2372,7 @@ va_end (ap); - if (!name) + if (name != NULL) return TRUE; } }