diff options
| author | Thomas Ulmer <thomasmulmer02@gmail.com> | 2025-12-03 19:42:16 -0800 |
|---|---|---|
| committer | Thomas Ulmer <thomasmulmer02@gmail.com> | 2025-12-03 19:42:16 -0800 |
| commit | 2089794e3f29f87f2d0c5d445e2bdac4968a3a99 (patch) | |
| tree | 67b2d20ebf94696ee7a60dc9d56d78182b8c2a24 /dwm/my-no-focus-follows-mouse.diff | |
| parent | be1994b27f1392b34586adaa8c026957509622ec (diff) | |
dwm: disable focus follows mouse
Diffstat (limited to 'dwm/my-no-focus-follows-mouse.diff')
| -rw-r--r-- | dwm/my-no-focus-follows-mouse.diff | 37 |
1 files changed, 37 insertions, 0 deletions
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; |
