summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-16 12:54:01 +0000
committermaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-16 12:54:01 +0000
commit014d57ce8c3aed3bf42dd6c0e964685c98c255d5 (patch)
tree60d469f9ce72721fed552f7e2d066d369d1f69bd
parent35b7c8ae6a103b2d68de4001f3ab8153487753c8 (diff)
downloadmarex-dev-014d57ce8c3aed3bf42dd6c0e964685c98c255d5.tar.gz
marex-dev-014d57ce8c3aed3bf42dd6c0e964685c98c255d5.tar.bz2
move plugin: fixed unsnapping when moving viewport upwards at the same time
git-svn-id: file:///beryl/trunk@4101 d7aaf104-2d23-0410-ae22-9d23157bf5a3
-rw-r--r--beryl-plugins/src/move.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/beryl-plugins/src/move.c b/beryl-plugins/src/move.c
index c598c81..94535d7 100644
--- a/beryl-plugins/src/move.c
+++ b/beryl-plugins/src/move.c
@@ -439,29 +439,31 @@ static void moveHandleMotionEvent(CompScreen * s, int xRoot, int yRoot)
{
if (w->state & CompWindowStateMaximizedVertMask)
{
- if ((yRoot - workArea.y) -
- ms->snapOffY >=
+ if ((yRoot - workArea.y) - ms->snapOffY >=
md->opt[MOVE_DISPLAY_OPTION_SNAPOFF_DISTANCE].value.i)
{
- int width = w->serverWidth;
-
- w->saveMask |= CWX | CWY;
+ if (!otherScreenGrabExist(s, "move", 0))
+ {
+ int width = w->serverWidth;
- if (w->saveMask & CWWidth)
- width = w->saveWc.width;
+ w->saveMask |= CWX | CWY;
- w->saveWc.x = xRoot - (width >> 1);
- w->saveWc.y = yRoot + (w->input.top >> 1);
+ if (w->saveMask & CWWidth)
+ width = w->saveWc.width;
- saveWindowGeometry(w, NULL, 0);
+ w->saveWc.x = xRoot - (width >> 1);
+ w->saveWc.y = yRoot + (w->input.top >> 1);
- md->x = md->y = 0;
+ saveWindowGeometry(w, NULL, 0);
- maximizeWindow(w, 0);
+ md->x = md->y = 0;
+
+ maximizeWindow(w, 0);
- ms->snapOffY = ms->snapBackY;
+ ms->snapOffY = ms->snapBackY;
- return;
+ return;
+ }
}
}
else if (ms->origState & CompWindowStateMaximizedVertMask)