diff options
-rw-r--r-- | src/cmd/rio/event.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/cmd/rio/event.c b/src/cmd/rio/event.c index 39aff18a..5b13e871 100644 --- a/src/cmd/rio/event.c +++ b/src/cmd/rio/event.c @@ -130,6 +130,12 @@ configurereq(XConfigureRequestEvent *e) if (e->value_mask & CWBorderWidth) c->border = e->border_width; gravitate(c, 0); + if (e->value_mask & CWStackMode) { + if (e->detail == Above) + top(c); + else + e->value_mask &= ~CWStackMode; + } if (c->parent != c->screen->root && c->window == e->window) { wc.x = c->x-BORDER; wc.y = c->y-BORDER; @@ -140,13 +146,10 @@ configurereq(XConfigureRequestEvent *e) wc.stack_mode = e->detail; XConfigureWindow(dpy, c->parent, e->value_mask, &wc); sendconfig(c); - } - if (e->value_mask & CWStackMode) { - if (wc.stack_mode == Above) { + if (e->value_mask & CWStackMode) { top(c); active(c); - }else - e->value_mask &= ~CWStackMode; + } } } |