From 485e2b676a0a2380274de2d1b5ad6c6cdc16ce7e Mon Sep 17 00:00:00 2001 From: Abhinav Date: Wed, 4 Jun 2025 19:18:52 +0100 Subject: set input focus AFTER mapping to avoid input mixing bug --- src/sxwm.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/sxwm.c') 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(); } -- cgit v1.2.3