diff options
| author | uint <abhinav.prsai@gmail.com> | 2025-12-13 17:52:34 +0000 |
|---|---|---|
| committer | uint <abhinav.prsai@gmail.com> | 2025-12-13 17:52:34 +0000 |
| commit | f2f32c9572ac22f546fdd08e64570ee4c1ceb611 (patch) | |
| tree | ec17f4053cdd532261a1f76ffe62b91a3f67066b /src/sxwm.c | |
| parent | f4ee512b3ed1684857925424500fb646815b6260 (diff) | |
fix monocle layout: see descrition
- fixed new windows not rising
- fixed windows not rising on focus in general
Diffstat (limited to 'src/sxwm.c')
| -rw-r--r-- | src/sxwm.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1358,7 +1358,7 @@ void hdl_map_req(XEvent *xev) if (user_config.new_win_focus) { focused = c; - set_input_focus(focused, False, True); + set_input_focus(focused, True, True); return; } update_borders(); @@ -2340,8 +2340,8 @@ void set_input_focus(Client *c, Bool raise_win, Bool warp) send_wm_take_focus(w); if (raise_win) { - /* if floating_on_top, don't raise a tiled window above floats. */ - if (c->floating || !user_config.floating_on_top) + /* always raise in monocle, otherwise respect floating_on_top */ + if (monocle || c->floating || !user_config.floating_on_top) XRaiseWindow(dpy, w); } /* EWMH focus hint */ @@ -2644,7 +2644,7 @@ void tile(void) if (monocle) { for (Client *c = head; c; c = c->next) { - if (!c->mapped || c->fullscreen) + if (!c->mapped || c->floating || c->fullscreen) continue; int border_width = user_config.border_width; @@ -2665,7 +2665,6 @@ void tile(void) }; XConfigureWindow(dpy, c->win, CWX | CWY | CWWidth | CWHeight | CWBorderWidth, &wc); - XRaiseWindow(dpy, c->win); c->x = wc.x; c->y = wc.y; @@ -2673,6 +2672,9 @@ void tile(void) c->h = wc.height; } + if (focused && focused->mapped && !focused->floating && !focused->fullscreen) + XRaiseWindow(dpy, focused->win); + update_borders(); return; } |
