JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
implemented restack behavior (floats are on top in tiled mode)
[dwm.git] / event.c
diff --git a/event.c b/event.c
index 1a8de56..e5ca166 100644 (file)
--- a/event.c
+++ b/event.c
@@ -118,21 +118,24 @@ buttonpress(XEvent *e)
                }
        }
        else if((c = getclient(ev->window))) {
-               higher(c);
                focus(c);
                switch(ev->button) {
                default:
                        break;
                case Button1:
-                       if(!c->ismax && (arrange == dofloat || c->isfloat))
+                       if(!c->ismax && (arrange == dofloat || c->isfloat)) {
+                               restack(c);
                                movemouse(c);
+                       }
                        break;
                case Button2:
                        zoom(NULL);
                        break;
                case Button3:
-                       if(!c->ismax && (arrange == dofloat || c->isfloat))
+                       if(!c->ismax && (arrange == dofloat || c->isfloat)) {
+                               restack(c);
                                resizemouse(c);
+                       }
                        break;
                }
        }