diff options
| author | Abhinav <abhinav.prsai@gmail.com> | 2025-06-08 23:20:29 +0100 |
|---|---|---|
| committer | Abhinav <abhinav.prsai@gmail.com> | 2025-06-08 23:20:29 +0100 |
| commit | 0da7d75c70cbe3f1e03856d4fe7b10642a6d550c (patch) | |
| tree | afd2bb2fc4f9ae14b25f05c6c72f98b7272f1b0b /src/sxwm.c | |
| parent | 9602d0d5678bd46545af20b3cf765c3c0ed9cb45 (diff) | |
change focus when switching workspaces
before when changing workspaces it would keep the focus on the previous
workspace if the changed workspace had no windows. fixed
Diffstat (limited to 'src/sxwm.c')
| -rw-r--r-- | src/sxwm.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -248,6 +248,8 @@ void change_workspace(int ws) } tile(); + + focused = NULL; if (workspaces[current_ws]) { focused = workspaces[current_ws]; Window focused_win = find_toplevel(focused->win); @@ -255,6 +257,10 @@ void change_workspace(int ws) if (user_config.warp_cursor) { warp_cursor(focused); } + update_borders(); + } + else { + XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); } long cd = current_ws; |
