]> git.corax.cc Git - dwm/commitdiff
Make focus follow the pointer again
authorMatthias Kruk <m@m10k.eu>
Mon, 26 Apr 2021 21:40:24 +0000 (06:40 +0900)
committerMatthias Kruk <m@m10k.eu>
Mon, 26 Apr 2021 21:40:24 +0000 (06:40 +0900)
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.

dwm.c

diff --git a/dwm.c b/dwm.c
index 32bb1c1d08e28613f5d21321b2c0bbd67ce7ed0b..30ecdd1f32091bc27dde75187b35efdd5dd4dd72 100755 (executable)
--- 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)
 {