From fabde67fac21df45422c5c29c8d0bf2c95182d26 Mon Sep 17 00:00:00 2001 From: bobthehuge Date: Fri, 23 May 2025 01:20:49 +0200 Subject: change focus after setting client monitor --- src/sxwm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3