diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-06-12 04:08:55 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-06-12 04:08:55 +0000 |
| commit | a883721bf759be32048cbfd669ed4d6e4d40d00b (patch) | |
| tree | 7916953ebace2dd506bbc2329bfd4559da13e02e /openbox/place.c | |
| parent | adfca324dadd3723afa25a3d399014265a5c8412 (diff) | |
basically this is smart placement but its better now..
Diffstat (limited to 'openbox/place.c')
| -rw-r--r-- | openbox/place.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/openbox/place.c b/openbox/place.c index 5d848cb9..66f367d4 100644 --- a/openbox/place.c +++ b/openbox/place.c @@ -220,7 +220,8 @@ enum { IGNORE_SHADED = 1 << 3, IGNORE_NONGROUP = 1 << 4, IGNORE_BELOW = 1 << 5, - IGNORE_END = 1 << 6 + IGNORE_NONFOCUS = 1 << 6, + IGNORE_END = 1 << 7 }; static gboolean place_nooverlap(ObClient *c, gint *x, gint *y) @@ -242,12 +243,14 @@ static gboolean place_nooverlap(ObClient *c, gint *x, gint *y) /* try all monitors in order of preference */ for (i = 0; i < screen_num_monitors && !ret; ++i) { + GList *it; + /* add the whole monitor */ spaces = area_add(spaces, areas[i]); /* go thru all the windows */ - for (sit = client_list; sit; sit = g_slist_next(sit)) { - ObClient *test = sit->data; + for (it = client_list; it; it = g_list_next(it)) { + ObClient *test = it->data; /* should we ignore this client? */ if (screen_showing_desktop) continue; @@ -279,6 +282,8 @@ static gboolean place_nooverlap(ObClient *c, gint *x, gint *y) test->group != c->group) continue; if ((ignore & IGNORE_BELOW) && test->layer < c->layer) continue; + if ((ignore & IGNORE_NONFOCUS) && + focus_client != test) continue; /* don't ignore this window, so remove it from the available area */ |
