aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--patches/dwm-netactivewindow-switch-20260904-d84cff9.diff19
1 files changed, 19 insertions, 0 deletions
diff --git a/patches/dwm-netactivewindow-switch-20260904-d84cff9.diff b/patches/dwm-netactivewindow-switch-20260904-d84cff9.diff
new file mode 100644
index 0000000..9eed1db
--- /dev/null
+++ b/patches/dwm-netactivewindow-switch-20260904-d84cff9.diff
@@ -0,0 +1,19 @@
+diff --git a/dwm.c b/dwm.c
+index 534a4ea..3c3fc80 100644
+--- a/dwm.c
++++ b/dwm.c
+@@ -542,8 +542,12 @@ clientmessage(XEvent *e)
+ setfullscreen(c, (cme->data.l[0] == 1 /* _NET_WM_STATE_ADD */
+ || (cme->data.l[0] == 2 /* _NET_WM_STATE_TOGGLE */ && !c->isfullscreen)));
+ } else if (cme->message_type == netatom[NetActiveWindow]) {
+- if (c != selmon->sel && !c->isurgent)
+- seturgent(c, 1);
++ if (!ISVISIBLE(c)) {
++ c->mon->tagset[c->mon->seltags] = c->tags;
++ selmon = c->mon;
++ arrange(selmon);
++ }
++ focus(c);
+ }
+ }
+