summaryrefslogtreecommitdiff
path: root/openbox/screen.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-05-09 04:04:53 +0000
committerDana Jansens <danakj@orodu.net>2007-05-09 04:04:53 +0000
commit4546925b589d30c46f3bced74a02b3d531de894c (patch)
treec0963f1e1302a79bb31cb9968283e8fcefa50a70 /openbox/screen.c
parent65eb46bd1f1f6c97cf1ff9506dd65792303a7ed4 (diff)
get the mouse pointer position if it is on another screen too.
let you move/resize from the client menu if the mouse is on another screen
Diffstat (limited to 'openbox/screen.c')
-rw-r--r--openbox/screen.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/openbox/screen.c b/openbox/screen.c
index d48d0dda..dea9d020 100644
--- a/openbox/screen.c
+++ b/openbox/screen.c
@@ -1267,7 +1267,16 @@ gboolean screen_pointer_pos(gint *x, gint *y)
Window w;
gint i;
guint u;
-
- return !!XQueryPointer(ob_display, RootWindow(ob_display, ob_screen),
- &w, &w, x, y, &i, &i, &u);
+ gboolean ret;
+
+ ret = !!XQueryPointer(ob_display, RootWindow(ob_display, ob_screen),
+ &w, &w, x, y, &i, &i, &u);
+ if (!ret) {
+ for (i = 0; i < ScreenCount(ob_display); ++i)
+ if (i != ob_screen)
+ if (XQueryPointer(ob_display, RootWindow(ob_display, i),
+ &w, &w, x, y, &i, &i, &u))
+ break;
+ }
+ return ret;
}