summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sxwm.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/sxwm.c b/src/sxwm.c
index 579a393..ac9e62e 100644
--- a/src/sxwm.c
+++ b/src/sxwm.c
@@ -782,6 +782,12 @@ void hdl_map_req(XEvent *xev)
XRaiseWindow(dpy, w);
}
+ XMapWindow(dpy, w);
+ for (Client *c = workspaces[current_ws]; c; c = c->next) {
+ if (c->win == w) {
+ c->mapped = True;
+ }
+ }
if (user_config.new_win_focus) {
focused = c;
XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
@@ -790,13 +796,6 @@ void hdl_map_req(XEvent *xev)
warp_cursor(c);
}
}
-
- XMapWindow(dpy, w);
- for (Client *c = workspaces[current_ws]; c; c = c->next) {
- if (c->win == w) {
- c->mapped = True;
- }
- }
update_borders();
}