sort smallest to largest area
Dana Jansens danakj@orodu.net
1 files changed,
1 insertions(+),
5 deletions(-)
jump to
M
openbox/place.c
→
openbox/place.c
@@ -124,13 +124,9 @@ }
static gint area_cmp(gconstpointer p1, gconstpointer p2) { - gint ret; const Rect *a1 = p1, *a2 = p2; - ret = RECT_TOP(*a1) - RECT_TOP(*a2); - if (!ret) - ret = RECT_LEFT(*a1) - RECT_LEFT(*a2); - return ret; + return a1->width * a1->height - a2->width * a2->height; } static gboolean place_smart(ObClient *client, gint *x, gint *y,