aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--monsterwm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/monsterwm.c b/monsterwm.c
index d6d5241..3436254 100644
--- a/monsterwm.c
+++ b/monsterwm.c
@@ -917,10 +917,10 @@ void update_current(client *c) {
PropModeReplace, (unsigned char *)&current->win, 1);
XSetInputFocus(dis, current->win, RevertToPointerRoot, CurrentTime);
- /* 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);
+ /* keep transient and floating windows on top of regular windows */
+ int tf = 0;
+ for (c=head; c; c=c->next) if (c->istransient || c->isfloating) tf = XRaiseWindow(dis, c->win);
+ if (!tf || current->isfloating || current->istransient) XRaiseWindow(dis, current->win);
if (CLICK_TO_FOCUS) XUngrabButton(dis, Button1, None, current->win);
XSync(dis, False);