t* dwm + patches
       
   URI git clone git://git.codevoid.de/dwm-sdk
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit b5068e32e9428ea2fe2c7b1e7b6b0f769ab119cb
   DIR parent f099d2d5b50e8a0a21ef59142babcd87801e6abd
   URI Author: Connor Lane Smith <cls@lubutu.com>
       Date:   Tue, 15 Nov 2011 20:16:58 +0100
       
       add sloppy monitor focus
       Diffstat:
         M dwm.c                               |      22 +++++++++++++++++++---
       
       1 file changed, 19 insertions(+), 3 deletions(-)
       ---
   DIR diff --git a/dwm.c b/dwm.c
       t@@ -200,6 +200,7 @@ static void manage(Window w, XWindowAttributes *wa);
        static void mappingnotify(XEvent *e);
        static void maprequest(XEvent *e);
        static void monocle(Monitor *m);
       +static void motionnotify(XEvent *e);
        static void movemouse(const Arg *arg);
        static Client *nexttiled(Client *c);
        static void pop(Client *);
       t@@ -271,6 +272,7 @@ static void (*handler[LASTEvent]) (XEvent *) = {
                [KeyPress] = keypress,
                [MappingNotify] = mappingnotify,
                [MapRequest] = maprequest,
       +        [MotionNotify] = motionnotify,
                [PropertyNotify] = propertynotify,
                [UnmapNotify] = unmapnotify
        };
       t@@ -1202,6 +1204,21 @@ monocle(Monitor *m) {
        }
        
        void
       +motionnotify(XEvent *e) {
       +        static Monitor *mon = NULL;
       +        Monitor *m;
       +        XMotionEvent *ev = &e->xmotion;
       +
       +        if(ev->window != root)
       +                return;
       +        if((m = recttomon(ev->x_root, ev->y_root, 1, 1)) != mon && mon) {
       +                selmon = m;
       +                focus(NULL);
       +        }
       +        mon = m;
       +}
       +
       +void
        movemouse(const Arg *arg) {
                int x, y, ocx, ocy, nx, ny;
                Client *c;
       t@@ -1614,9 +1631,8 @@ setup(void) {
                                PropModeReplace, (unsigned char *) netatom, NetLast);
                /* select for events */
                wa.cursor = cursor[CurNormal];
       -        wa.event_mask = SubstructureRedirectMask|SubstructureNotifyMask|ButtonPressMask
       -                        |EnterWindowMask|LeaveWindowMask|StructureNotifyMask
       -                        |PropertyChangeMask;
       +        wa.event_mask = SubstructureRedirectMask|SubstructureNotifyMask|ButtonPressMask|PointerMotionMask
       +                        |EnterWindowMask|LeaveWindowMask|StructureNotifyMask|PropertyChangeMask;
                XChangeWindowAttributes(dpy, root, CWEventMask|CWCursor, &wa);
                XSelectInput(dpy, root, wa.event_mask);
                grabkeys();