aboutsummaryrefslogtreecommitdiff
path: root/monsterwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'monsterwm.c')
-rw-r--r--monsterwm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/monsterwm.c b/monsterwm.c
index d8c982d..d6d5241 100644
--- a/monsterwm.c
+++ b/monsterwm.c
@@ -916,7 +916,12 @@ void update_current(client *c) {
XChangeProperty(dis, root, netatoms[NET_ACTIVE], XA_WINDOW, 32,
PropModeReplace, (unsigned char *)&current->win, 1);
XSetInputFocus(dis, current->win, RevertToPointerRoot, CurrentTime);
- XRaiseWindow(dis, current->win);
+
+ /* keep transient windows on top of regular windows */
+ int trans = 0;
+ for (c=head; c; c=c->next) if (c->istransient) trans = XRaiseWindow(dis, c->win);
+ if (!trans || current->isfloating) XRaiseWindow(dis, current->win);
+
if (CLICK_TO_FOCUS) XUngrabButton(dis, Button1, None, current->win);
XSync(dis, False);
}