[dev] [patch] map new window *after* arrange()

2011-07-06 Thread Peter Hartlich
Couldn't dwm map newly created windows *after* they have been moved
to their proper position? Less flickering (especially noticeable with
the attachabove/attachaside patches), and it feels snappier on a slow
computer.

I haven't experienced any problems with the attached patch so far.

Peter
diff -r c787646ca93f dwm.c
--- a/dwm.c Sat Jul 02 11:01:58 2011 +0200
+++ b/dwm.c Wed Jul 06 22:55:49 2011 +0200
@@ -1149,9 +1149,10 @@
attach(c);
attachstack(c);
XMoveResizeWindow(dpy, c-win, c-x + 2 * sw, c-y, c-w, c-h); /* 
some windows require this */
-   XMapWindow(dpy, c-win);
setclientstate(c, NormalState);
arrange(c-mon);
+   XMapWindow(dpy, c-win);
+   focus(c);
 }
 
 void


Re: [dev] [patch] map new window *after* arrange()

2011-07-06 Thread garbeam
Hi Peter,

On 6 July 2011 23:15, Peter Hartlich bq...@hartlich.com wrote:
 Couldn't dwm map newly created windows *after* they have been moved
 to their proper position? Less flickering (especially noticeable with
 the attachabove/attachaside patches), and it feels snappier on a slow
 computer.

 I haven't experienced any problems with the attached patch so far.

your patch looks alright to me, I intend to apply it.

Cheers,
--garbeam