summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/rotate.c
diff options
context:
space:
mode:
authormaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-11-21 07:23:43 +0000
committermaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-11-21 07:23:43 +0000
commit2533334edeb53d040f1b724c2b8a02483346373a (patch)
treed23ed977888719541e70ca0b9ceb65aa96afd92d /beryl-plugins/src/rotate.c
parentaaaf03eb4499b7b55275d9acb3310bb525422427 (diff)
downloadmarex-dev-2533334edeb53d040f1b724c2b8a02483346373a.tar.gz
marex-dev-2533334edeb53d040f1b724c2b8a02483346373a.tar.bz2
ns:
- added function detecting if a listed screen grab is active - replaced similar function in blurfx with that one - partly revert Vuen patch from #1055 and use the new functionality instead - make scale and showdesktop work together correctly using the new functionality (end showdesktop before starting scale), closes #1029 git-svn-id: file:///beryl/trunk@1336 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/rotate.c')
-rw-r--r--beryl-plugins/src/rotate.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/beryl-plugins/src/rotate.c b/beryl-plugins/src/rotate.c
index 00b6f17..41cf937 100644
--- a/beryl-plugins/src/rotate.c
+++ b/beryl-plugins/src/rotate.c
@@ -711,8 +711,7 @@ rotatePreparePaintScreen (CompScreen * s, int msSinceLastPaint)
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 ((fabs (rs->yrot) < 0.1f) && !screenGrabExist (s, "scale", 0))
{
float xrot;
int tx;
@@ -1146,7 +1145,6 @@ rotate (CompDisplay * d,
if (s->hsize < 2)
return FALSE;
- //allow rotation to proceed if we're de-scaling
if (otherScreenGrabExist (s, "rotate", "move", "switcher", "cube", "scale", 0))
return FALSE;
@@ -1744,7 +1742,7 @@ rotateEdgeFlip (CompScreen * s,
if (otherScreenGrabExist (s, "rotate", 0))
return;
}
- else if (otherScreenGrabExist (s, "rotate", 0))
+ else if (screenGrabExist (s, "move", 0))
{
ROTATE_SCREEN (s);
@@ -2131,7 +2129,7 @@ rotateHandleEvent (CompDisplay * d, XEvent * event)
if (!w->placed)
break;
- if (otherScreenGrabExist (s, "rotate", "switcher", "cube", 0))
+ if (otherScreenGrabExist (s, "rotate", "switcher", "cube", "scale", 0))
break;
/* reset movement */
@@ -2184,22 +2182,11 @@ rotateHandleEvent (CompDisplay * d, XEvent * event)
{
int dx;
- //allow rotation to proceed if we're de-scaling
if (otherScreenGrabExist (s, "rotate", "switcher", "cube", "scale", 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;