JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
removed explicit warp in movemouse
[dwm.git] / dwm.c
diff --git a/dwm.c b/dwm.c
index 05c0199..c992860 100644 (file)
--- a/dwm.c
+++ b/dwm.c
@@ -60,7 +60,7 @@ enum { ColBorder, ColFG, ColBG, ColLast };              /* color */
 enum { NetSupported, NetWMName, NetLast };              /* EWMH atoms */
 enum { WMProtocols, WMDelete, WMName, WMState, WMLast };/* default atoms */
 enum { ClkLtSymbol = 64, ClkStatusText, ClkWinTitle,
-       ClkClientWin, ClkRootWin, ClkLast };             /* clicks */
+       ClkClientWin, ClkLast };                         /* clicks */
 
 /* typedefs */
 typedef unsigned int uint;
@@ -312,7 +312,7 @@ buttonpress(XEvent *e) {
        Client *c;
        XButtonPressedEvent *ev = &e->xbutton;
 
-       click = ClkRootWin;
+       click = ClkLast;
        if(ev->window == barwin) {
                i = x = 0;
                do
@@ -980,11 +980,6 @@ movemouse(const Arg *arg) {
        None, cursor[CurMove], CurrentTime) != GrabSuccess)
                return;
        XQueryPointer(dpy, root, &dummy, &dummy, &x1, &y1, &di, &di, &dui);
-       if(x1 < c->x || x1 > c->x + c->w || y1 < c->y || y1 > c->y + c->h) {
-               XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, 0, 0);
-               x1 = c->x + 1;
-               y1 = c->y + 1;
-       }
        for(;;) {
                XMaskEvent(dpy, MOUSEMASK|ExposureMask|SubstructureRedirectMask, &ev);
                switch (ev.type) {
@@ -1379,7 +1374,7 @@ setup(void) {
                        PropModeReplace, (unsigned char *) netatom, NetLast);
 
        /* select for events */
-       wa.event_mask = SubstructureRedirectMask|SubstructureNotifyMask|ButtonPressMask
+       wa.event_mask = SubstructureRedirectMask|SubstructureNotifyMask
                        |EnterWindowMask|LeaveWindowMask|StructureNotifyMask;
        XChangeWindowAttributes(dpy, root, CWEventMask|CWCursor, &wa);
        XSelectInput(dpy, root, wa.event_mask);