JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
applied sanders jukka patch
[dwm.git] / event.c
diff --git a/event.c b/event.c
index 86c4819..df0a5ef 100644 (file)
--- a/event.c
+++ b/event.c
@@ -49,6 +49,7 @@ movemouse(Client *c) {
        if(XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
                        None, cursor[CurMove], CurrentTime) != GrabSuccess)
                return;
+       c->ismax = False;
        XQueryPointer(dpy, root, &dummy, &dummy, &x1, &y1, &di, &di, &dui);
        for(;;) {
                XMaskEvent(dpy, MOUSEMASK | ExposureMask | StructureNotifyMask, &ev);
@@ -92,6 +93,7 @@ resizemouse(Client *c) {
        if(XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
                                None, cursor[CurResize], CurrentTime) != GrabSuccess)
                return;
+       c->ismax = False;
        XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w, c->h);
        for(;;) {
                XMaskEvent(dpy, MOUSEMASK | ExposureMask | StructureNotifyMask, &ev);
@@ -168,13 +170,13 @@ buttonpress(XEvent *e) {
                if(CLEANMASK(ev->state) != MODKEY)
                        return;
                if(ev->button == Button1 && (arrange == dofloat || c->isfloat)) {
-                       restack(c);
+                       restack();
                        movemouse(c);
                }
                else if(ev->button == Button2)
                        zoom(NULL);
                else if(ev->button == Button3 && (arrange == dofloat || c->isfloat)) {
-                       restack(c);
+                       restack();
                        resizemouse(c);
                }
        }
@@ -188,11 +190,7 @@ configurerequest(XEvent *e) {
        XWindowChanges wc;
 
        if((c = getclient(ev->window))) {
-               if((c == sel) && !c->isfloat && (arrange != dofloat)) {
-                       synconfig(c, sx, sy + bh, sw - 2, sh - 2 - bh, ev->border_width);
-                       XSync(dpy, False);
-                       return;
-               }
+               c->ismax = False;
                gravitate(c, True);
                if(ev->value_mask & CWX)
                        c->x = ev->x;
@@ -386,7 +384,7 @@ void (*handler[LASTEvent]) (XEvent *) = {
 };
 
 void
-grabkeys() {
+grabkeys(void) {
        static unsigned int len = sizeof(key) / sizeof(key[0]);
        unsigned int i;
        KeyCode code;
@@ -406,7 +404,7 @@ grabkeys() {
 }
 
 void
-procevent() {
+procevent(void) {
        XEvent ev;
 
        while(XPending(dpy)) {