]> Dogcows Code - chaz/openbox/blobdiff - openbox/place.c
Fix another memleak
[chaz/openbox] / openbox / place.c
index 6a97c36328e50b389a27489a94b1b9f1efda538f..9892836ec80a3ce9de4ce2c585eb27e06619ced4 100644 (file)
@@ -134,6 +134,8 @@ static Rect **pick_head(ObClient *c)
     for (i = 0; i < screen_num_monitors; ++i)
         area[i] = screen_area(c->desktop, choice[i], NULL);
 
+    g_free(choice);
+
     return area;
 }
 
@@ -316,9 +318,9 @@ static gboolean place_nooverlap(ObClient *c, gint *x, gint *y)
 
                 if (r->width >= c->frame->area.width &&
                     r->height >= c->frame->area.height &&
-                    r->width > maxsize)
+                    r->width * r->height > maxsize)
                 {
-                    maxsize = r->width;
+                    maxsize = r->width * r->height;
                     maxit = sit;
                 }
             }
This page took 0.024377 seconds and 4 git commands to generate.