]> Dogcows Code - chaz/openbox/blobdiff - openbox/screen.c
client_configure_full is trying to move a window, it shouldn't determine the window...
[chaz/openbox] / openbox / screen.c
index d97a732b58e3a1dad883a929c48ee0a73cfe709b..3542dfdc3a76512f3c6de1274da386fab5ae959f 100644 (file)
@@ -1172,6 +1172,30 @@ Rect *screen_area_monitor(guint desktop, guint head)
     return &area[desktop][head];
 }
 
+guint screen_find_monitor(Rect *search)
+{
+    guint i;
+    guint most = 0;
+    guint mostv = 0;
+
+    for (i = 0; i < screen_num_monitors; ++i) {
+        Rect *area = screen_physical_area_monitor(i);
+        if (RECT_INTERSECTS_RECT(*area, *search)) {
+            Rect r;
+            guint v;
+
+            RECT_SET_INTERSECTION(r, *area, *search);
+            v = r.width * r.height;
+
+            if (v > mostv) {
+                mostv = v;
+                most = i;
+            }
+        }
+    }
+    return most;
+}
+
 Rect *screen_physical_area()
 {
     return screen_physical_area_monitor(screen_num_monitors);
This page took 0.024976 seconds and 4 git commands to generate.