diff options
| author | Abhinav <abhinav.prsai@gmail.com> | 2025-06-04 19:18:52 +0100 |
|---|---|---|
| committer | Abhinav <abhinav.prsai@gmail.com> | 2025-06-04 19:18:52 +0100 |
| commit | 485e2b676a0a2380274de2d1b5ad6c6cdc16ce7e (patch) | |
| tree | 4fcb58b9703619e747c93b703387f79605362a45 /src | |
| parent | 7abf3c09260c6ed226045c8586231ecdf51f8368 (diff) | |
set input focus AFTER mapping to avoid input mixing bug
Diffstat (limited to 'src')
| -rw-r--r-- | src/sxwm.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -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(); } |
