diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-06-01 23:46:38 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-06-01 23:46:38 +0000 |
| commit | 2b28aa8c41b71d1f96d8ebf9cd72dd0c2ccd0678 (patch) | |
| tree | e1a5cf4c216c3d7f469ad3b6d3d5b34956f31176 /openbox | |
| parent | 22a17d3a28603637cf9259d050c19e8090d7ab2f (diff) | |
smrts.
compare windows for restacking based on their desktops and if they are iconified. dont compare to irrelavent ones. also if the sibling isn't valid then don't use it.
Diffstat (limited to 'openbox')
| -rw-r--r-- | openbox/stacking.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/openbox/stacking.c b/openbox/stacking.c index 942a4620..5d01e5e9 100644 --- a/openbox/stacking.c +++ b/openbox/stacking.c @@ -483,7 +483,10 @@ static gboolean stacking_occluded(ObClient *client, ObClient *sibling) it = (found ? g_list_previous(it) :g_list_next(it))) if (WINDOW_IS_CLIENT(it->data)) { ObClient *c = it->data; - if (found && c->frame->visible) { + if (found && !c->iconic && + (c->desktop == DESKTOP_ALL || client->desktop == DESKTOP_ALL || + c->desktop == client->desktop)) + { if (RECT_INTERSECTS_RECT(c->frame->area, client->frame->area)) { if (sibling != NULL) { @@ -522,7 +525,10 @@ static gboolean stacking_occludes(ObClient *client, ObClient *sibling) for (it = stacking_list; it; it = g_list_next(it)) if (WINDOW_IS_CLIENT(it->data)) { ObClient *c = it->data; - if (found && c->frame->visible) { + if (found && !c->iconic && + (c->desktop == DESKTOP_ALL || client->desktop == DESKTOP_ALL || + c->desktop == client->desktop)) + { if (RECT_INTERSECTS_RECT(c->frame->area, client->frame->area)) { if (sibling != NULL) { @@ -548,6 +554,16 @@ static gboolean stacking_occludes(ObClient *client, ObClient *sibling) void stacking_restack_request(ObClient *client, ObClient *sibling, gint detail, gboolean activate) { + if (sibling && ((client->desktop != sibling->desktop && + client->desktop != DESKTOP_ALL && + sibling->desktop != DESKTOP_ALL) || + sibling->iconic)) + { + ob_debug("Setting restack sibling to NULL, they are not on the same " + "desktop or it is iconified\n"); + sibling = NULL; + } + switch (detail) { case Below: ob_debug("Restack request Below for client %s sibling %s\n", |
