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
Dana Jansens danakj@orodu.net
3 files changed,
19 insertions(+),
8 deletions(-)
M
openbox/screen.c
→
openbox/screen.c
@@ -1267,7 +1267,16 @@ {
Window w; gint i; guint u; + gboolean ret; - return !!XQueryPointer(ob_display, RootWindow(ob_display, ob_screen), - &w, &w, x, y, &i, &i, &u); + 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; }
M
openbox/screen.h
→
openbox/screen.h
@@ -107,6 +107,8 @@ /*! Sets the root cursor. This function decides which cursor to use, but you
gotta call it to let it know it should change. */ void screen_set_root_cursor(); +/*! Gives back the pointer's position in x and y. Returns TRUE if the pointer + is on this screen and FALSE if it is on another screen. */ gboolean screen_pointer_pos(gint *x, gint *y); #endif