2 passes at smart placement
Dana Jansens danakj@orodu.net
1 files changed,
8 insertions(+),
5 deletions(-)
jump to
M
openbox/place.c
→
openbox/place.c
@@ -133,7 +133,8 @@ 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, + gboolean only_focused) { guint i; gboolean ret = FALSE;@@ -151,7 +152,8 @@ ObClient *c = it->data;
if (c != client && !c->shaded && client_normal(c)) { spaces = area_remove(spaces, &c->frame->area); - break; + if (only_focused) + break; } }@@ -269,9 +271,10 @@ void place_client(ObClient *client, gint *x, gint *y)
{ if (client->positioned) return; - if (place_transient(client, x, y) || - place_dialog(client, x, y) || - place_smart(client, x, y) || + if (place_transient(client, x, y) || + place_dialog(client, x, y) || + place_smart(client, x, y, FALSE) || + place_smart(client, x, y, TRUE) || (config_focus_follow ? place_under_mouse(client, x, y) : place_random(client, x, y)))