diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-09-15 04:59:23 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-09-15 04:59:23 +0000 |
| commit | 52e75474336365d31d93ef348f0aa1515cdb7319 (patch) | |
| tree | e80196eca260c4b65985c5133de79aa2a311ed1e | |
| parent | e5703910d0a1f92e06d8a8173f3408d4f2240a73 (diff) | |
sort smallest to largest area
| -rw-r--r-- | openbox/place.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/openbox/place.c b/openbox/place.c index af90bb61..27df69f5 100644 --- a/openbox/place.c +++ b/openbox/place.c @@ -124,13 +124,9 @@ static GSList* area_remove(GSList *list, Rect *a) 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, |
