]> Dogcows Code - chaz/openbox/blobdiff - openbox/place.c
plug memory leaks from the new strut code
[chaz/openbox] / openbox / place.c
index 661226aeec05aaf71f9ea6d42b0cc7a312d5117d..2d14f5bd30ed9c7b54779aff2d59308fdfb42f1f 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();
 }
@@ -111,7 +113,10 @@ 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)) {
+        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;
This page took 0.021912 seconds and 4 git commands to generate.