commit 426e171d20b7fbab385b1374ae9e1527f3318f93
parent d81be1b196f45b5f65e104dc2dc7cfb9e883d26b
Author: Christophe-Marie Duquesne <chm.duquesne@gmail.com>
Date: Wed, 8 Dec 2010 10:29:17 +0100
merged with last version
Diffstat:
2 files changed, 40 insertions(+), 1 deletion(-)
diff --git a/dwm.suckless.org/patches/dwm-5.8.2-focusonclick.diff b/dwm.suckless.org/patches/dwm-5.8.2-focusonclick.diff
@@ -0,0 +1,38 @@
+diff -r 72e52c5333ef config.def.h
+--- a/config.def.h Wed Nov 25 13:56:17 2009 +0000
++++ b/config.def.h Sun Mar 21 00:38:45 2010 +0100
+@@ -12,6 +12,7 @@
+ static const unsigned int snap = 32; /* snap pixel */
+ static const Bool showbar = True; /* False means no bar */
+ static const Bool topbar = True; /* False means bottom bar */
++static const Bool focusonclick = True; /* Change focus only on click */
+
+ /* tagging */
+ static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
+diff -r 72e52c5333ef dwm.c
+--- a/dwm.c Wed Nov 25 13:56:17 2009 +0000
++++ b/dwm.c Sun Mar 21 00:38:45 2010 +0100
+@@ -791,14 +791,16 @@
+
+ if((ev->mode != NotifyNormal || ev->detail == NotifyInferior) && ev->window != root)
+ return;
+- if((m = wintomon(ev->window)) && m != selmon) {
+- unfocus(selmon->sel);
+- selmon = m;
++ if (!focusonclick) {
++ if((m = wintomon(ev->window)) && m != selmon) {
++ unfocus(selmon->sel, False);
++ selmon = m;
++ }
++ if((c = wintoclient(ev->window)))
++ focus(c);
++ else
++ focus(NULL);
+ }
+- if((c = wintoclient(ev->window)))
+- focus(c);
+- else
+- focus(NULL);
+ }
+
+ void
diff --git a/dwm.suckless.org/patches/focusonclick.md b/dwm.suckless.org/patches/focusonclick.md
@@ -7,8 +7,9 @@
## Download
* [dwm-r1508-focusonclick.diff](dwm-r1508-focusonclick.diff) (dwm r1508) (20100321)
+ * [dwm-5.8.2-focusonclick.diff](dwm-5.8.2-focusonclick.diff) (dwm 2010604)
## Author
* Markus P. - peters_mops at arcor . de
-
+ * Wolfgang S. - ezzieyguywuf at gmail period com