From 70f88f8c815cb9344530aa2b56abe2a53b2a0f4a Mon Sep 17 00:00:00 2001 From: ray Date: Wed, 25 Mar 2020 16:28:42 +0000 Subject: [PATCH] revert focusonclick focusonclick reverted. functionality implemented by removing enternotify function. --- dwm.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/dwm.c b/dwm.c index 003e56b..82a5682 100644 --- a/dwm.c +++ b/dwm.c @@ -170,7 +170,6 @@ static void detachstack(Client *c); static Monitor *dirtomon(int dir); static void drawbar(Monitor *m); static void drawbars(void); -static void enternotify(XEvent *e); static void expose(XEvent *e); static void focus(Client *c); static void focusin(XEvent *e); @@ -260,7 +259,6 @@ static void (*handler[LASTEvent]) (XEvent *) = { [ConfigureRequest] = configurerequest, [ConfigureNotify] = configurenotify, [DestroyNotify] = destroynotify, - [EnterNotify] = enternotify, [Expose] = expose, [FocusIn] = focusin, [KeyPress] = keypress, @@ -767,25 +765,6 @@ drawbars(void) drawbar(m); } -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) {