summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/move.c
diff options
context:
space:
mode:
authormaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-11-15 09:00:39 +0000
committermaniac <maniac@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-11-15 09:00:39 +0000
commitaf89bc1dc7acd9e5c92eea8e519c8ce7de794451 (patch)
tree2621e92f88589d22687a552b7f3812a914b54411 /beryl-plugins/src/move.c
parentce199e2631ca1ec0d1c4c9f3d989b480a5ba2fd8 (diff)
downloadmarex-dev-af89bc1dc7acd9e5c92eea8e519c8ce7de794451.tar.gz
marex-dev-af89bc1dc7acd9e5c92eea8e519c8ce7de794451.tar.bz2
move plugin: some more multihead workarea fixes
git-svn-id: file:///beryl/trunk@1209 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/move.c')
-rw-r--r--beryl-plugins/src/move.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/beryl-plugins/src/move.c b/beryl-plugins/src/move.c
index 975ea7f..93179fc 100644
--- a/beryl-plugins/src/move.c
+++ b/beryl-plugins/src/move.c
@@ -151,11 +151,15 @@ moveInitiate (CompDisplay * d,
w = findWindowAtDisplay (d, xid);
if (w)
{
+ XRectangle workArea;
unsigned int mods;
- int x, y;
+ int x, y, head;
MOVE_SCREEN (w->screen);
+ head = screenGetOutputDevForWindow (w);
+ screenGetOutputDevWorkArea (w->screen, head, &workArea);
+
mods = getIntOptionNamed (option, nOption, "modifiers", 0);
x = getIntOptionNamed (option, nOption, "x",
@@ -187,8 +191,8 @@ moveInitiate (CompDisplay * d,
ms->origState = w->state;
- ms->snapBackY = w->serverY;
- ms->snapOffY = y;
+ ms->snapBackY = w->serverY - workArea.y;
+ ms->snapOffY = y - workArea.y;
if (!ms->grabIndex)
ms->grabIndex =
@@ -307,7 +311,7 @@ moveHandleMotionEvent (CompScreen * s, int xRoot, int yRoot)
{
if (w->state & CompWindowStateMaximizedVertMask)
{
- if (yRoot - ms->snapOffY >=
+ if ((yRoot - workArea.y) - ms->snapOffY >=
md->opt[MOVE_DISPLAY_OPTION_SNAPOFF_DISTANCE].value.i)
{
XWindowChanges xwc;
@@ -334,7 +338,7 @@ moveHandleMotionEvent (CompScreen * s, int xRoot, int yRoot)
}
else if (ms->origState & CompWindowStateMaximizedVertMask)
{
- if (yRoot - ms->snapBackY <
+ if ((yRoot workArea.y) - ms->snapBackY <
md->opt[MOVE_DISPLAY_OPTION_SNAPBACK_DISTANCE].value.i)
{
if (!otherScreenGrabExist (s, "move", 0))