JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
added pointer warp on drop in resize
[dwm.git] / event.c
diff --git a/event.c b/event.c
index c913320..cfe2d2a 100644 (file)
--- a/event.c
+++ b/event.c
@@ -82,6 +82,8 @@ resizemouse(Client *c) {
                switch(ev.type) {
                case ButtonRelease:
                        resize(c, True);
+                       XWarpPointer(dpy, None, c->win, 0, 0, 0, 0,
+                                       c->w + c->border - 1, c->h + c->border - 1);
                        XUngrabPointer(dpy, CurrentTime);
                        return;
                case ConfigureRequest:
@@ -230,7 +232,7 @@ enternotify(XEvent *e) {
        if((c = getclient(ev->window)) && isvisible(c))
                focus(c);
        else if(ev->window == root) {
-               issel = True;
+               selscreen = True;
                for(c = stack; c && !isvisible(c); c = c->snext);
                focus(c);
        }
@@ -269,7 +271,7 @@ leavenotify(XEvent *e) {
        XCrossingEvent *ev = &e->xcrossing;
 
        if((ev->window == root) && !ev->same_screen) {
-               issel = False;
+               selscreen = False;
                focus(NULL);
        }
 }
@@ -308,10 +310,6 @@ propertynotify(XEvent *e) {
        if(ev->state == PropertyDelete)
                return; /* ignore */
        if((c = getclient(ev->window))) {
-               if(ev->atom == wmatom[WMProtocols]) {
-                       c->proto = getproto(c->win);
-                       return;
-               }
                switch (ev->atom) {
                        default: break;
                        case XA_WM_TRANSIENT_FOR: