summaryrefslogtreecommitdiff
path: root/openbox/stacking.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-05-09 16:57:17 +0000
committerDana Jansens <danakj@orodu.net>2003-05-09 16:57:17 +0000
commitf26f23de50cb7941a7702198e3b4d1b2f9de062e (patch)
treeec1d73c8e977d86e9231676c51e684a3415e7a0e /openbox/stacking.c
parent60065663ba9dc448dcf90fd200cd459bcdb9ef9c (diff)
all my changes while i was offline.
better alt-tabbing. better transient handling. i dont even know. lots of fucking cool shit so WATCH the FUCK OUT.
Diffstat (limited to 'openbox/stacking.c')
-rw-r--r--openbox/stacking.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/openbox/stacking.c b/openbox/stacking.c
index 6ff01721..ab1e1955 100644
--- a/openbox/stacking.c
+++ b/openbox/stacking.c
@@ -70,7 +70,7 @@ static GList *find_lowest_transient(Client *c)
static void raise_recursive(Client *client)
{
Window wins[2]; /* only ever restack 2 windows. */
- GList *it;
+ GList *it, *low;
GSList *sit;
g_assert(stacking_list != NULL); /* this would be bad */
@@ -86,15 +86,15 @@ static void raise_recursive(Client *client)
/* find 'it' where it is the positiion in the stacking order where
'client' will be inserted *before* */
- it = find_lowest_transient(client);
- if (it)
- it = it->next;
- else {
- /* the stacking list is from highest to lowest */
- for (it = stacking_list; it; it = it->next) {
- if (client->layer >= ((Client*)it->data)->layer)
- break;
+ low = find_lowest_transient(client);
+ /* the stacking list is from highest to lowest */
+ for (it = g_list_last(stacking_list); it; it = it->prev) {
+ if (it == low || client->layer < ((Client*)it->data)->layer) {
+ it = it->next;
+ break;
}
+ if (it == stacking_list)
+ break;
}
/*