about summary refs log tree commit diff
path: root/mousefunc.c
diff options
context:
space:
mode:
authorokan <okan>2011-06-24 05:51:25 +0000
committerokan <okan>2011-06-24 05:51:25 +0000
commitc8ea76a9657c6e70d9bd2198639076e2235a4ea2 (patch)
tree28091e0259bb93246d95dc2be45be427396e9e42 /mousefunc.c
parentc2a8363dd9868776c12bcdf172b7a02188621c90 (diff)
downloadcwm-c8ea76a9657c6e70d9bd2198639076e2235a4ea2.tar.gz
cwm-c8ea76a9657c6e70d9bd2198639076e2235a4ea2.tar.xz
cwm-c8ea76a9657c6e70d9bd2198639076e2235a4ea2.zip
re-order sweep draw so that we map into the client window after
re-parenting; from Sviatoslav Chagaev.

ok oga@
Diffstat (limited to 'mousefunc.c')
-rw-r--r--mousefunc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mousefunc.c b/mousefunc.c
index 9037b6a..3050c31 100644
--- a/mousefunc.c
+++ b/mousefunc.c
@@ -64,10 +64,9 @@ mousefunc_sweep_draw(struct client_ctx *cc)
 	width_name = font_width(sc, cc->name, strlen(cc->name)) + 4;
 	width = MAX(width_size, width_name);
 
-	XMoveResizeWindow(X_Dpy, sc->menuwin, cc->geom.x, cc->geom.y,
-	    width, font_height(sc) * 2);
-	XMapWindow(X_Dpy, sc->menuwin);
 	XReparentWindow(X_Dpy, sc->menuwin, cc->win, 0, 0);
+	XMoveResizeWindow(X_Dpy, sc->menuwin, 0, 0, width, font_height(sc) * 2);
+	XMapWindow(X_Dpy, sc->menuwin);
 	XClearWindow(X_Dpy, sc->menuwin);
 	font_draw(sc, cc->name, strlen(cc->name), sc->menuwin,
 	    2, font_ascent(sc) + 1);