dwm-preventfocusshift-20240831-6.5.diff (781B)
1 From 554f5a8a2205a7c52280babf5685462d8991b038 Mon Sep 17 00:00:00 2001 2 From: Suleyman Farajli <suleyman@farajli.net> 3 Date: Sat, 31 Aug 2024 13:34:58 +0400 4 Subject: [PATCH] prevent focus shifting when a window is spawned in fullscreen 5 6 --- 7 dwm.c | 2 ++ 8 1 file changed, 2 insertions(+) 9 10 diff --git a/dwm.c b/dwm.c 11 index f1d86b2..31b5d07 100644 12 --- a/dwm.c 13 +++ b/dwm.c 14 @@ -1080,6 +1080,8 @@ manage(Window w, XWindowAttributes *wa) 15 (unsigned char *) &(c->win), 1); 16 XMoveResizeWindow(dpy, c->win, c->x + 2 * sw, c->y, c->w, c->h); /* some windows require this */ 17 setclientstate(c, NormalState); 18 + if(selmon->sel && selmon->sel->isfullscreen && !c->isfloating) 19 + setfullscreen(selmon->sel, 0); 20 if (c->mon == selmon) 21 unfocus(selmon->sel, 0); 22 c->mon->sel = c; 23 -- 24 2.44.2 25