commit 3e0473b3d7953007409a5f30c899fd3dbb09c0e6
Author: Suleyman Farajli <suleyman_AT_farajli.net>
Date: Sat Aug 31 13:42:22 2024 +0400
preventfocusshift patched added
diff --git a/dwm.suckless.org/patches/preventfocusshift/dwm-preventfocusshift-20240831-6.5.diff b/dwm.suckless.org/patches/preventfocusshift/dwm-preventfocusshift-20240831-6.5.diff
new file mode 100644
index 00000000..78a24cb0
--- /dev/null
+++ b/dwm.suckless.org/patches/preventfocusshift/dwm-preventfocusshift-20240831-6.5.diff
_AT_@ -0,0 +1,25 @@
+From 554f5a8a2205a7c52280babf5685462d8991b038 Mon Sep 17 00:00:00 2001
+From: Suleyman Farajli <suleyman_AT_farajli.net>
+Date: Sat, 31 Aug 2024 13:34:58 +0400
+Subject: [PATCH] prevent focus shifting when a window is spawned in fullscreen
+
+---
+ dwm.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/dwm.c b/dwm.c
+index f1d86b2..31b5d07 100644
+--- a/dwm.c
++++ b/dwm.c
+_AT_@ -1080,6 +1080,8 @@ manage(Window w, XWindowAttributes *wa)
+ (unsigned char *) &(c->win), 1);
+ XMoveResizeWindow(dpy, c->win, c->x + 2 * sw, c->y, c->w, c->h); /* some windows require this */
+ setclientstate(c, NormalState);
++ if(selmon->sel && selmon->sel->isfullscreen && !c->isfloating)
++ setfullscreen(selmon->sel, 0);
+ if (c->mon == selmon)
+ unfocus(selmon->sel, 0);
+ c->mon->sel = c;
+--
+2.44.2
+
diff --git a/dwm.suckless.org/patches/preventfocusshift/index.md b/dwm.suckless.org/patches/preventfocusshift/index.md
new file mode 100644
index 00000000..9f1a9c73
--- /dev/null
+++ b/dwm.suckless.org/patches/preventfocusshift/index.md
_AT_@ -0,0 +1,15 @@
+togglefloatingcenter
+====================
+
+Description
+-----------
+Automatically exit fullscreen, when another window is spawned.
+Especially useful with [actualfullscreen](
https://dwm.suckless.org/patches/actualfullscreen/) patch.
+
+Download
+--------
+* [dwm-preventfocusshift-20240831-6.5.diff](dwm-preventfocusshift-20240831-6.5.diff)
+
+Author
+------
+* Suleyman Farajli - <suleyman_AT_farajli.net>
Received on Sat Aug 31 2024 - 11:42:47 CEST