]> Dogcows Code - chaz/openbox/blobdiff - openbox/screen.c
Let menus place themselves on monitors where the mouse is not present
[chaz/openbox] / openbox / screen.c
index 8d0460d570a7a70daecaefa9bc7dc35956c9735c..35c9f5433b8bfbd702c7f1a6ced89588c25156d2 100644 (file)
@@ -1719,17 +1719,21 @@ void screen_set_root_cursor(void)
                       ob_cursor(OB_CURSOR_POINTER));
 }
 
-guint screen_monitor_pointer()
+guint screen_find_monitor_point(guint x, guint y)
 {
     Rect mon;
-    gint x, y;
-    if (screen_pointer_pos(&x, &y))
-        RECT_SET(mon, x, y, 1, 1);
-    else
-        RECT_SET(mon, 0, 0, 1, 1);
+    RECT_SET(mon, x, y, 1, 1);
     return screen_find_monitor(&mon);
 }
 
+guint screen_monitor_pointer()
+{
+    gint x, y;
+    if (!screen_pointer_pos(&x, &y))
+        x = y = 0;
+    return screen_find_monitor_point(x, y);
+}
+
 gboolean screen_pointer_pos(gint *x, gint *y)
 {
     Window w;
This page took 0.024049 seconds and 4 git commands to generate.