sort smallest to largest area
This commit is contained in:
parent
e5703910d0
commit
52e7547433
1 changed files with 1 additions and 5 deletions
|
@ -124,13 +124,9 @@ static GSList* area_remove(GSList *list, Rect *a)
|
||||||
|
|
||||||
static gint area_cmp(gconstpointer p1, gconstpointer p2)
|
static gint area_cmp(gconstpointer p1, gconstpointer p2)
|
||||||
{
|
{
|
||||||
gint ret;
|
|
||||||
const Rect *a1 = p1, *a2 = p2;
|
const Rect *a1 = p1, *a2 = p2;
|
||||||
|
|
||||||
ret = RECT_TOP(*a1) - RECT_TOP(*a2);
|
return a1->width * a1->height - a2->width * a2->height;
|
||||||
if (!ret)
|
|
||||||
ret = RECT_LEFT(*a1) - RECT_LEFT(*a2);
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean place_smart(ObClient *client, gint *x, gint *y,
|
static gboolean place_smart(ObClient *client, gint *x, gint *y,
|
||||||
|
|
Loading…
Reference in a new issue