summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoruint23 <72694427+uint23@users.noreply.github.com>2025-05-23 21:34:29 +0100
committerGitHub <noreply@github.com>2025-05-23 21:34:29 +0100
commitfa5d772cc32c3a8a20070dfc45c03695d5dc8c7a (patch)
tree6f3921f05e249209b1da32e3d35436042ccb49d2 /src
parent70dea221c7ab67099a1f65fb93e456cd85ef9dc3 (diff)
parentfabde67fac21df45422c5c29c8d0bf2c95182d26 (diff)
Merge pull request #44 from bobthehuge/main
Change focus after setting client monitor
Diffstat (limited to 'src')
-rw-r--r--src/sxwm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sxwm.c b/src/sxwm.c
index a40d69c..d3917c7 100644
--- a/src/sxwm.c
+++ b/src/sxwm.c
@@ -155,10 +155,6 @@ Client *add_client(Window w, int ws)
tail->next = c;
}
- if (ws == current_ws && !focused) {
- focused = c;
- }
-
open_windows++;
XSelectInput(dpy, w,
EnterWindowMask | LeaveWindowMask | FocusChangeMask | PropertyChangeMask | StructureNotifyMask);
@@ -197,6 +193,10 @@ Client *add_client(Window w, int ws)
c->floating = True;
}
+ if (ws == current_ws && !focused) {
+ focused = c;
+ }
+
XRaiseWindow(dpy, w);
return c;
}