From: Matthias Kruk Date: Mon, 26 Apr 2021 21:40:24 +0000 (+0900) Subject: Make focus follow the pointer again X-Git-Url: https://git.corax.cc/?a=commitdiff_plain;h=a223365d890530499a4ca69bfaa42fe5c427fb08;p=dwm Make focus follow the pointer again The problems that occured in the past, when the pointer and focus were set to follow eachother, were not caused by either of the two, but an issue in the focusing code of dwm. Since that problem has since been fixed, this commit re-introduces the pointer-following focus. --- diff --git a/dwm.c b/dwm.c index 32bb1c1..30ecdd1 100755 --- a/dwm.c +++ b/dwm.c @@ -296,9 +296,7 @@ static void drawsquare(Bool filled, Bool empty, Bool invert, unsigned long col[ColLast]); static void drawtext(const char *text, unsigned long col[ColLast], Bool invert); -#ifndef M10K static void enternotify(XEvent *e); -#endif /* ! M10K */ static void expose(XEvent *e); static void focus(struct client *c); static void focusin(XEvent *e); @@ -316,9 +314,7 @@ static void killclient(const union arg *arg); static void manage(Window w, XWindowAttributes *wa); static void mappingnotify(XEvent *e); static void maprequest(XEvent *e); -#ifndef M10K static void motionnotify(XEvent *e); -#endif /* ! M10K */ static void movemouse(const union arg *arg); static struct client *nexttiled(struct client *c); static void pop(struct client *); @@ -387,21 +383,13 @@ static void (*handler[LASTEvent]) (XEvent *) = { [ConfigureRequest] = configurerequest, [ConfigureNotify] = configurenotify, [DestroyNotify] = destroynotify, -#ifndef M10K [EnterNotify] = enternotify, -#else - [EnterNotify] = NULL, -#endif /* M10K */ [Expose] = expose, [FocusIn] = focusin, [KeyPress] = keypress, [MappingNotify] = mappingnotify, [MapRequest] = maprequest, -#ifndef M10K [MotionNotify] = motionnotify, -#else - [MotionNotify] = NULL, -#endif /* ! M10K */ [PropertyNotify] = propertynotify, [UnmapNotify] = unmapnotify }; @@ -1174,7 +1162,6 @@ void drawtext(const char *text, unsigned long col[ColLast], Bool invert) return; } -#ifndef M10K void enternotify(XEvent *e) { struct client *c; @@ -1200,7 +1187,6 @@ void enternotify(XEvent *e) return; } -#endif /* ! M10K */ void expose(XEvent *e) { @@ -1704,7 +1690,6 @@ void monocle(struct monitor *m) return; } -#ifndef M10K void motionnotify(XEvent *e) { static struct monitor *mon = NULL; @@ -1723,7 +1708,6 @@ void motionnotify(XEvent *e) mon = m; return; } -#endif /* ! M10K */ void movemouse(const union arg *arg) {