2 passes at smart placement
This commit is contained in:
parent
21c29cba10
commit
e5703910d0
1 changed files with 8 additions and 5 deletions
|
@ -133,7 +133,8 @@ static gint area_cmp(gconstpointer p1, gconstpointer p2)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean place_smart(ObClient *client, gint *x, gint *y)
|
static gboolean place_smart(ObClient *client, gint *x, gint *y,
|
||||||
|
gboolean only_focused)
|
||||||
{
|
{
|
||||||
guint i;
|
guint i;
|
||||||
gboolean ret = FALSE;
|
gboolean ret = FALSE;
|
||||||
|
@ -151,6 +152,7 @@ static gboolean place_smart(ObClient *client, gint *x, gint *y)
|
||||||
|
|
||||||
if (c != client && !c->shaded && client_normal(c)) {
|
if (c != client && !c->shaded && client_normal(c)) {
|
||||||
spaces = area_remove(spaces, &c->frame->area);
|
spaces = area_remove(spaces, &c->frame->area);
|
||||||
|
if (only_focused)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -271,7 +273,8 @@ void place_client(ObClient *client, gint *x, gint *y)
|
||||||
return;
|
return;
|
||||||
if (place_transient(client, x, y) ||
|
if (place_transient(client, x, y) ||
|
||||||
place_dialog(client, x, y) ||
|
place_dialog(client, x, y) ||
|
||||||
place_smart(client, x, y) ||
|
place_smart(client, x, y, FALSE) ||
|
||||||
|
place_smart(client, x, y, TRUE) ||
|
||||||
(config_focus_follow ?
|
(config_focus_follow ?
|
||||||
place_under_mouse(client, x, y) :
|
place_under_mouse(client, x, y) :
|
||||||
place_random(client, x, y)))
|
place_random(client, x, y)))
|
||||||
|
|
Loading…
Reference in a new issue