changeset: 1013:a1da1c0ebc1a
tag: tip
user: jameseric
date: Sat Nov 24 18:14:21 2012 -0600
files: dwm.suckless.org/patches/dwm-6.0-focusonclick.diff dwm.suckless.org/patches/focusonclick.md
description:
added option to disable focus changing with the scroll wheel to focusonclick patch
diff -r 5a783bf5f6ae -r a1da1c0ebc1a dwm.suckless.org/patches/dwm-6.0-focusonclick.diff
--- a/dwm.suckless.org/patches/dwm-6.0-focusonclick.diff Sun Nov 25 00:56:39 2012 +0200
+++ b/dwm.suckless.org/patches/dwm-6.0-focusonclick.diff Sat Nov 24 18:14:21 2012 -0600
_AT_@ -1,7 +1,20 @@
-diff -r 399346e83a88 dwm.c
---- a/dwm.c Fri Mar 23 15:19:53 2012 +0100
-+++ b/dwm.c Fri Mar 23 15:21:38 2012 +0100
-_AT_@ -266,7 +266,6 @@
+diff -up dwm-6.0/config.def.h dwm-6.0-focusonclick/config.def.h
+--- dwm-6.0/config.def.h 2011-12-19 09:02:46.000000000 -0600
++++ dwm-6.0-focusonclick/config.def.h 2012-11-24 17:48:19.867072611 -0600
+_AT_@ -13,6 +13,9 @@ static const unsigned int snap = 32
+ static const Bool showbar = True; /* False means no bar */
+ static const Bool topbar = True; /* False means bottom bar */
+
++/* False means using the scroll wheel on a window will not change focus */
++static const Bool focusonwheelscroll = False;
++
+ /* tagging */
+ static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
+
+diff -up dwm-6.0/dwm.c dwm-6.0-focusonclick/dwm.c
+--- dwm-6.0/dwm.c 2011-12-19 09:02:46.000000000 -0600
++++ dwm-6.0-focusonclick/dwm.c 2012-11-24 18:00:08.902254102 -0600
+_AT_@ -266,7 +266,6 @@ static void (*handler[LASTEvent]) (XEven
[ConfigureRequest] = configurerequest,
[ConfigureNotify] = configurenotify,
[DestroyNotify] = destroynotify,
_AT_@ -9,15 +22,18 @@
[Expose] = expose,
[FocusIn] = focusin,
[KeyPress] = keypress,
-_AT_@ -456,6 +455,7 @@
+_AT_@ -455,7 +454,9 @@ buttonpress(XEvent *e) {
+ click = ClkWinTitle;
}
else if((c = wintoclient(ev->window))) {
- focus(c);
+- focus(c);
++ if (focusonwheelscroll || (ev->button != Button4 && ev->button != Button5))
++ focus(c);
+ XAllowEvents(dpy, ReplayPointer, CurrentTime);
click = ClkClientWin;
}
for(i = 0; i < LENGTH(buttons); i++)
-_AT_@ -1001,11 +1001,11 @@
+_AT_@ -1001,11 +1002,11 @@ grabbuttons(Client *c, Bool focused) {
XGrabButton(dpy, buttons[i].button,
buttons[i].mask | modifiers[j],
c->win, False, BUTTONMASK,
_AT_@ -30,3 +46,4 @@
+ BUTTONMASK, GrabModeSync, GrabModeSync, None, None);
}
}
+
diff -r 5a783bf5f6ae -r a1da1c0ebc1a dwm.suckless.org/patches/focusonclick.md
--- a/dwm.suckless.org/patches/focusonclick.md Sun Nov 25 00:56:39 2012 +0200
+++ b/dwm.suckless.org/patches/focusonclick.md Sat Nov 24 18:14:21 2012 -0600
_AT_@ -6,7 +6,7 @@
## Download
- * [dwm-6.0-focusonclick.diff](dwm-6.0-focusonclick.diff) (2012-03-24)
+ * [dwm-6.0-focusonclick.diff](dwm-6.0-focusonclick.diff) (2012-11-24)
* [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)
_AT_@ -14,6 +14,7 @@
* Markus P. - peters_mops at arcor . de
* Wolfgang S. - ezzieyguywuf at gmail period com
+ * Eric Pruitt - added option to disable focus changing with the scroll wheel
* [Alessandro Di Martino][1] - Maintainer of the 6.0 version.
[1]:
http://www.alessandrodimartino.com
Received on Sun Nov 25 2012 - 01:14:26 CET