From 9e9f24f97088cddeb27e09be49ef318a22a3c75a Mon Sep 17 00:00:00 2001 From: Abhinav Prasai Date: Mon, 13 Oct 2025 19:26:11 +0100 Subject: fix floating_on_top making transient windows hide under moved the XRaiseWindow calls outside of tile() --- src/sxwm.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/sxwm.c b/src/sxwm.c index bf7aca1..cefd990 100644 --- a/src/sxwm.c +++ b/src/sxwm.c @@ -2367,11 +2367,13 @@ void set_input_focus(Client *c, Bool raise_win, Bool warp) XSetInputFocus(dpy, w, RevertToPointerRoot, CurrentTime); send_wm_take_focus(w); - if (raise_win && c->floating) { - XRaiseWindow(dpy, w); + if (raise_win) { + /* if floating_on_top, don't raise a tiled window above floats. */ + if (c->floating || !user_config.floating_on_top) { + XRaiseWindow(dpy, w); + } } - - /* EWMH */ + /* EWMH focus hint */ XChangeProperty(dpy, root, _NET_ACTIVE_WINDOW, XA_WINDOW, 32, PropModeReplace, (unsigned char *)&w, 1); @@ -2856,16 +2858,6 @@ void tile(void) } update_borders(); } - - if (user_config.floating_on_top) { - for (Client *c = workspaces[current_ws]; c; c = c->next) { - if (c->mapped && c->floating && !c->fullscreen) { - XRaiseWindow(dpy, c->win); - } - } - } - - update_borders(); } void toggle_floating(void) -- cgit v1.2.3