]> Dogcows Code - chaz/openbox/blobdiff - openbox/menuframe.c
Fix menu placement to avoid dead xinerama areas, possibly break other stuff
[chaz/openbox] / openbox / menuframe.c
index 5708cdf8d2e337c604a209cfbed53ac1525c127e..e6fc53ab2949cbb2b8fcc2b14d7e4823ac84a5bf 100644 (file)
@@ -324,11 +324,18 @@ void menu_frame_move_on_screen(ObMenuFrame *self, gint x, gint y,
                                gint *dx, gint *dy)
 {
     const Rect *a = NULL;
-    gint pos, half;
+    Rect search = self->area;
+    gint pos, half, monitor;
 
     *dx = *dy = 0;
+    RECT_SET_POINT(search, x, y);
 
-    a = screen_physical_area_monitor(screen_find_monitor_point(x, y));
+    if (self->parent)
+        monitor = self->parent->monitor;
+    else
+        monitor = screen_find_monitor(&search);
+
+    a = screen_physical_area_monitor(monitor);
 
     half = g_list_length(self->entries) / 2;
     pos = g_list_index(self->entries, self->selected);
This page took 0.020917 seconds and 4 git commands to generate.