From c6d3b40b1fb564ba54941707b4324a7b7cc3ed5a Mon Sep 17 00:00:00 2001 From: Abhinav Date: Sat, 7 Jun 2025 14:18:03 +0100 Subject: make change_workspace use find_toplevel for changing focus This is to fix a bug that sometimes happens with firefoxs use of subwindows which causes it to not go in focus --- src/sxwm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/sxwm.c b/src/sxwm.c index fbf55e1..6eff793 100644 --- a/src/sxwm.c +++ b/src/sxwm.c @@ -250,7 +250,8 @@ void change_workspace(int ws) tile(); if (workspaces[current_ws]) { focused = workspaces[current_ws]; - XSetInputFocus(dpy, focused->win, RevertToPointerRoot, CurrentTime); + Window focused_win = find_toplevel(focused->win); + XSetInputFocus(dpy, focused_win, RevertToPointerRoot, CurrentTime); if (user_config.warp_cursor) { warp_cursor(focused); } -- cgit v1.2.3