summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}