On Fri, Feb 13, 2015 at 06:05:32PM +0100, ACE wrote: > Maybe someone has a patch for this problem.
See attached :) Eric
>From 731ad15396deb3872411189b613c5508d786392d Mon Sep 17 00:00:00 2001 From: Eric Pruitt <[email protected]> Date: Sun, 20 Jul 2014 19:46:59 -0500 Subject: [PATCH] Prevent rearrangement due to _NET_ACTIVE_WINDOW - Changed dwm's behaviour so _NET_ACTIVE_WINDOW calls "focus" on a window without popping it to prevent unwanted re-ordering. --- patches/00-clientmessage-focus.diff | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 patches/00-clientmessage-focus.diff diff --git a/patches/00-clientmessage-focus.diff b/patches/00-clientmessage-focus.diff new file mode 100644 index 0000000..00e7f3d --- /dev/null +++ b/patches/00-clientmessage-focus.diff @@ -0,0 +1,21 @@ +Author: Eric Pruitt, https://github.com/ericpruitt/ +Description: Some poorly behaved applications (Steam, Chromium) unnecessarily +produce a _NET_ACTIVE_WINDOW when focused or clicked causing dwm to pop the +window and re-order it in the window list. This patch changes dwm's behaviour +so _NET_ACTIVE_WINDOW calls "focus" on a window without popping it to prevent +unwanted re-ordering. + +diff --git a/dwm.c b/dwm.c +index ffc8864..db2d7a5 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -531,7 +531,8 @@ clientmessage(XEvent *e) { + c->mon->seltags ^= 1; + c->mon->tagset[c->mon->seltags] = c->tags; + } +- pop(c); ++ focus(c); ++ arrange(c->mon); + } + } + -- 1.7.10.4
