[wiki] [sites] wiki updated
changeset: 652:4cfa4e57dfab
tag: tip
user: Wolfgang E. Sanyer <ezzieyguywuf_AT_gmail.com>
date: Tue Dec 07 22:44:58 2010 -0500
files: dwm.suckless.org/patches/dwm-5.8.2-focusonclick.diff dwm.suckless.org/patches/focusonclick.md
description:
Updated this patch to be compatible with newer versions of dwm.
The call on unfocus needed an additional param.
diff -r e7af13b57348 -r 4cfa4e57dfab dwm.suckless.org/patches/dwm-5.8.2-focusonclick.diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dwm.suckless.org/patches/dwm-5.8.2-focusonclick.diff Tue Dec 07 22:44:58 2010 -0500
_AT_@ -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
+_AT_@ -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
+_AT_@ -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 -r e7af13b57348 -r 4cfa4e57dfab dwm.suckless.org/patches/focusonclick.md
--- a/dwm.suckless.org/patches/focusonclick.md Mon Dec 06 22:25:25 2010 +0000
+++ b/dwm.suckless.org/patches/focusonclick.md Tue Dec 07 22:44:58 2010 -0500
_AT_@ -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
Received on Wed Dec 08 2010 - 04:46:25 CET
This archive was generated by hypermail 2.3.0
: Thu Sep 13 2012 - 19:31:33 CEST