Sorry for spamming the list, but I didn't catch monocle mode with the
last patch. Here is a corrected patch...

-- 
Eckehard Berns
diff -r 070112b7435f dwm.c
--- a/dwm.c     Thu Jan 12 07:36:05 2012 +0100
+++ b/dwm.c     Thu Jan 12 23:56:15 2012 +0100
@@ -907,6 +907,8 @@
        }
        if(c) {
                focus(c);
+               if (selmon->sel->isfloating || 
!selmon->lt[selmon->sellt]->arrange)
+                       XRaiseWindow(dpy, selmon->sel->win);
                restack(selmon);
        }
 }
@@ -1227,7 +1229,7 @@
 
        if(!(c = selmon->sel))
                return;
-       restack(selmon);
+       XRaiseWindow(dpy, selmon->sel->win);
        ocx = c->x;
        ocy = c->y;
        if(XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, 
GrabModeAsync,
@@ -1371,7 +1373,7 @@
 
        if(!(c = selmon->sel))
                return;
-       restack(selmon);
+       XRaiseWindow(dpy, selmon->sel->win);
        ocx = c->x;
        ocy = c->y;
        if(XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, 
GrabModeAsync,
@@ -1738,9 +1740,11 @@
        if(!selmon->sel)
                return;
        selmon->sel->isfloating = !selmon->sel->isfloating || 
selmon->sel->isfixed;
-       if(selmon->sel->isfloating)
+       if(selmon->sel->isfloating) {
                resize(selmon->sel, selmon->sel->x, selmon->sel->y,
                       selmon->sel->w, selmon->sel->h, False);
+               XRaiseWindow(dpy, selmon->sel->win);
+       }
        arrange(selmon);
 }
 

Reply via email to