diff options
| author | Abhinav Prasai <abhinav.prsai@gmail.com> | 2025-10-06 19:05:11 +0100 |
|---|---|---|
| committer | Abhinav Prasai <abhinav.prsai@gmail.com> | 2025-10-06 19:05:11 +0100 |
| commit | 437226c4fd4c6b9b090add81fb18352808849e76 (patch) | |
| tree | 9068e9158d951207bc9808e11cb607cfd9c257b7 /src/sxwm.c | |
| parent | 1e221771eaa18f31401a4fbe1781fbb4f78c2608 (diff) | |
add floating_on_top, floating windows stay above tiled windows
Diffstat (limited to 'src/sxwm.c')
| -rw-r--r-- | src/sxwm.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -1574,6 +1574,7 @@ void init_defaults(void) default_config.new_win_focus = True; default_config.warp_cursor = True; default_config.new_win_master = False; + default_config.floating_on_top = True; user_config = default_config; } @@ -2363,7 +2364,7 @@ void set_input_focus(Client *c, Bool raise_win, Bool warp) XSetInputFocus(dpy, w, RevertToPointerRoot, CurrentTime); send_wm_take_focus(w); - if (raise_win) { + if (raise_win && c->floating) { XRaiseWindow(dpy, w); } @@ -2816,6 +2817,16 @@ 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) |
