]> Dogcows Code - chaz/openbox/blobdiff - openbox/place.c
bugfix
[chaz/openbox] / openbox / place.c
index 661226aeec05aaf71f9ea6d42b0cc7a312d5117d..6bcfe9d8df0d107bdf07424d7ab8f0e93cd3622f 100644 (file)
@@ -45,10 +45,12 @@ static Rect *pick_pointer_head(ObClient *c)
 
     screen_pointer_pos(&px, &py);
      
-    for (i = 0; i < screen_num_monitors; ++i) {  
-        if (RECT_CONTAINS(*screen_physical_area_monitor(i), px, py)) {
+    for (i = 0; i < screen_num_monitors; ++i) {
+        Rect *monitor = screen_physical_area_monitor(i);
+        gboolean contain = RECT_CONTAINS(*monitor, px, py);
+        g_free(monitor);
+        if (contain)
             return screen_area_monitor(c->desktop, i, NULL);
-        }
     }
     g_assert_not_reached();
 }
@@ -110,12 +112,16 @@ static Rect **pick_head(ObClient *c)
 
     screen_pointer_pos(&px, &py);
 
-    for (i = 0; i < screen_num_monitors; i++)
-        if (RECT_CONTAINS(*screen_physical_area_monitor(i), px, py)) {
+    for (i = 0; i < screen_num_monitors; i++) {
+        Rect *monitor = screen_physical_area_monitor(i);
+        gboolean contain = RECT_CONTAINS(*monitor, px, py);
+        g_free(monitor);
+        if (contain) {
             add_choice(choice, i);
             ob_debug("placement adding choice %d for mouse pointer\n", i);
             break;
         }
+    }
 
     /* add any leftover choices */
     for (i = 0; i < screen_num_monitors; ++i)
This page took 0.023212 seconds and 4 git commands to generate.