diff --git a/src/compositor.c b/src/compositor.c index 5877f22015c153d7ecac4053bd746419ec1de09d..85818f8e12b1a623923fa8e04f7cc74ccb4d27c7 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -3332,7 +3332,7 @@ zoom_timeout_cb (gpointer data) return FALSE; /* stop calling this callback */ } - getMouseXY (screen_info, screen_info->xroot, &x_root, &y_root); + getMouseXY (screen_info, &x_root, &y_root); if (screen_info->cursorLocation.x + screen_info->cursorOffsetX != x_root || screen_info->cursorLocation.y + screen_info->cursorOffsetY != y_root) diff --git a/src/misc.c b/src/misc.c index 080b1f096e2de113aebeccd480a90fb6207685d5..05db3dbb67306ec0ba26e768b3c645f3e67a71be 100644 --- a/src/misc.c +++ b/src/misc.c @@ -45,7 +45,7 @@ #include "misc.h" guint -getMouseXY (ScreenInfo *screen_info, Window w, gint *x2, gint *y2) +getMouseXY (ScreenInfo *screen_info, gint *x2, gint *y2) { Window w1, w2; guint mask; @@ -54,8 +54,9 @@ getMouseXY (ScreenInfo *screen_info, Window w, gint *x2, gint *y2) TRACE ("window (0x%lx)", w); myDisplayErrorTrapPush (screen_info->display_info); - XQueryPointer (myScreenGetXDisplay (screen_info), w, &w1, &w2, &x1, &y1, x2, y2, &mask); + XQueryPointer (myScreenGetXDisplay (screen_info), screen_info->xroot, &w1, &w2, &x1, &y1, x2, y2, &mask); myDisplayErrorTrapPopIgnored (screen_info->display_info); + return mask; } diff --git a/src/misc.h b/src/misc.h index 29240141278ab538717054fdc401f6128ff4ead1..73b864daf13829ff99bfe01d30f45e6781c9c6d0 100644 --- a/src/misc.h +++ b/src/misc.h @@ -61,7 +61,6 @@ #endif guint getMouseXY (ScreenInfo *, - Window, gint *, gint *); GC createGC (ScreenInfo *, diff --git a/src/placement.c b/src/placement.c index 15975b39075bc24e8aebf341734aa4ce8b87a4c7..3fb1294f3a6c683515aa16493fa39e4e618560da 100644 --- a/src/placement.c +++ b/src/placement.c @@ -800,7 +800,7 @@ clientInitPosition (Client * c) } else { - getMouseXY (screen_info, screen_info->xroot, &msx, &msy); + getMouseXY (screen_info, &msx, &msy); myScreenFindMonitorAtPoint (screen_info, msx, msy, &rect); place = TRUE; } diff --git a/src/screen.c b/src/screen.c index 5349e312cd6cee11c64b5133194fec1d927ed832..f18c0d70bcd4494025a233c0efb0f2aabac760d1 100644 --- a/src/screen.c +++ b/src/screen.c @@ -606,7 +606,7 @@ myScreenGetModifierPressed (ScreenInfo *screen_info) { int rx, ry; - return (int) getMouseXY (screen_info, screen_info->xroot, &rx, &ry); + return (int) getMouseXY (screen_info, &rx, &ry); } Client *