summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/move/src/move.cpp14
-rw-r--r--plugins/resize/src/resize.cpp16
2 files changed, 6 insertions, 24 deletions
diff --git a/plugins/move/src/move.cpp b/plugins/move/src/move.cpp
index 300d337..351ef7e 100644
--- a/plugins/move/src/move.cpp
+++ b/plugins/move/src/move.cpp
@@ -568,7 +568,6 @@ MoveScreen::handleEvent (XEvent *event)
if (w)
{
CompOption::Vector o;
- int xRoot, yRoot;
o.push_back (CompOption ("window", CompOption::TypeInt));
o[0].value ().set ((int) event->xclient.window);
@@ -584,19 +583,12 @@ MoveScreen::handleEvent (XEvent *event)
}
else
{
- unsigned int mods;
- Window root, child;
- int i;
-
- XQueryPointer (screen->dpy (), screen->root (),
- &root, &child, &xRoot, &yRoot,
- &i, &i, &mods);
/* TODO: not only button 1 */
- if (mods & Button1Mask)
+ if (pointerMods & Button1Mask)
{
o.push_back (CompOption ("modifiers", CompOption::TypeInt));
- o[2].value ().set ((int) mods);
+ o[2].value ().set ((int) pointerMods);
o.push_back (CompOption ("x", CompOption::TypeInt));
o[3].value ().set ((int) event->xclient.data.l[0]);
@@ -611,7 +603,7 @@ MoveScreen::handleEvent (XEvent *event)
moveInitiate (&optionGetInitiateButton (),
CompAction::StateInitButton, o);
- moveHandleMotionEvent (screen, xRoot, yRoot);
+ moveHandleMotionEvent (screen, pointerX, pointerY);
}
}
}
diff --git a/plugins/resize/src/resize.cpp b/plugins/resize/src/resize.cpp
index 7371e0b..2d7ad86 100644
--- a/plugins/resize/src/resize.cpp
+++ b/plugins/resize/src/resize.cpp
@@ -296,8 +296,6 @@ getOutputForEdge (int windowOutput, unsigned int touch, bool skipFirst)
while (co != -1);
}
- fprintf (stderr, "constraining to %i\n", ret);
-
return ret;
}
@@ -1279,17 +1277,9 @@ ResizeScreen::handleEvent (XEvent *event)
ResizeDownMask | ResizeLeftMask,
ResizeLeftMask,
};
- unsigned int mods;
- Window root, child;
- int xRoot, yRoot, i;
-
- XQueryPointer (screen->dpy (),
- screen->root (),
- &root, &child, &xRoot, &yRoot,
- &i, &i, &mods);
/* TODO: not only button 1 */
- if (mods & Button1Mask)
+ if (pointerMods & Button1Mask)
{
o.push_back (CompOption ("modifiers",
CompOption::TypeInt));
@@ -1302,7 +1292,7 @@ ResizeScreen::handleEvent (XEvent *event)
o.push_back (CompOption ("button",
CompOption::TypeInt));
- o[2].value ().set ((int) mods);
+ o[2].value ().set ((int) pointerMods);
o[3].value ().set
((int) event->xclient.data.l[0]);
o[4].value ().set
@@ -1318,7 +1308,7 @@ ResizeScreen::handleEvent (XEvent *event)
CompAction::StateInitButton, o);
ResizeScreen::get (screen)->
- handleMotionEvent (xRoot, yRoot);
+ handleMotionEvent (pointerX, pointerY);
}
}
}