From 2089794e3f29f87f2d0c5d445e2bdac4968a3a99 Mon Sep 17 00:00:00 2001 From: Thomas Ulmer Date: Wed, 3 Dec 2025 19:42:16 -0800 Subject: dwm: disable focus follows mouse --- dwm/my-no-focus-follows-mouse.diff | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 dwm/my-no-focus-follows-mouse.diff (limited to 'dwm/my-no-focus-follows-mouse.diff') diff --git a/dwm/my-no-focus-follows-mouse.diff b/dwm/my-no-focus-follows-mouse.diff new file mode 100644 index 0000000..aefcb3c --- /dev/null +++ b/dwm/my-no-focus-follows-mouse.diff @@ -0,0 +1,37 @@ +diff -ruN ../dwm-clean/dwm.c ./dwm.c +--- ../dwm-clean/dwm.c 2025-08-09 06:00:55.740267680 -0700 ++++ ./dwm.c 2025-12-03 19:36:27.601767290 -0800 +@@ -248,7 +248,6 @@ + [ConfigureRequest] = configurerequest, + [ConfigureNotify] = configurenotify, + [DestroyNotify] = destroynotify, +- [EnterNotify] = enternotify, + [Expose] = expose, + [FocusIn] = focusin, + [KeyPress] = keypress, +@@ -757,25 +756,6 @@ + } + + void +-enternotify(XEvent *e) +-{ +- Client *c; +- Monitor *m; +- XCrossingEvent *ev = &e->xcrossing; +- +- if ((ev->mode != NotifyNormal || ev->detail == NotifyInferior) && ev->window != root) +- return; +- c = wintoclient(ev->window); +- m = c ? c->mon : wintomon(ev->window); +- if (m != selmon) { +- unfocus(selmon->sel, 1); +- selmon = m; +- } else if (!c || c == selmon->sel) +- return; +- focus(c); +-} +- +-void + expose(XEvent *e) + { + Monitor *m; -- cgit v1.2.3