diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-09-15 04:32:06 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-09-15 04:32:06 +0000 |
| commit | e5703910d0a1f92e06d8a8173f3408d4f2240a73 (patch) | |
| tree | fd40fa20a8fb3b9ea1c28fbe188179101a0fb096 /openbox | |
| parent | 21c29cba106e44fe89a0bd12de23878c9ea84262 (diff) | |
2 passes at smart placement
Diffstat (limited to 'openbox')
| -rw-r--r-- | openbox/place.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/openbox/place.c b/openbox/place.c index 6fc1bd18..af90bb61 100644 --- a/openbox/place.c +++ b/openbox/place.c @@ -133,7 +133,8 @@ static gint area_cmp(gconstpointer p1, gconstpointer p2) 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 @@ static gboolean place_smart(ObClient *client, gint *x, gint *y) 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))) |
