diff options
author | okan <okan> | 2012-12-19 15:21:34 +0000 |
---|---|---|
committer | okan <okan> | 2012-12-19 15:21:34 +0000 |
commit | f77166194f4586cb19abcb7951ca05e356ac74e1 (patch) | |
tree | 304227f75a0b05af3f544be74a6ce47b3fae676e /mousefunc.c | |
parent | 878eb6bf050c6b55104e12c17b9644c2625bace0 (diff) | |
parent | dc1e3a88438dc732349154bca610dbe813d2fc04 (diff) | |
download | cwm-f77166194f4586cb19abcb7951ca05e356ac74e1.tar.gz cwm-f77166194f4586cb19abcb7951ca05e356ac74e1.tar.xz cwm-f77166194f4586cb19abcb7951ca05e356ac74e1.zip |
cvsimport
Diffstat (limited to 'mousefunc.c')
-rw-r--r-- | mousefunc.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/mousefunc.c b/mousefunc.c index 37dd7a1..7c07a36 100644 --- a/mousefunc.c +++ b/mousefunc.c @@ -68,9 +68,9 @@ mousefunc_sweep_draw(struct client_ctx *cc) 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, + font_draw(sc, cc->name, strlen(cc->name), sc->menuwin, 0, 2, font_ascent(sc) + 1); - font_draw(sc, asize, strlen(asize), sc->menuwin, + font_draw(sc, asize, strlen(asize), sc->menuwin, 0, width / 2 - width_size / 2, font_height(sc) + font_ascent(sc) + 1); } @@ -250,12 +250,8 @@ mousefunc_menu_unhide(struct client_ctx *cc, void *arg) if (old_cc != NULL) client_ptrsave(old_cc); client_ptrwarp(cc); - } else { - while ((mi = TAILQ_FIRST(&menuq)) != NULL) { - TAILQ_REMOVE(&menuq, mi, entry); - free(mi); - } - } + } else + menuq_clear(&menuq); } void @@ -280,8 +276,5 @@ mousefunc_menu_cmd(struct client_ctx *cc, void *arg) if (mi != NULL) u_spawn(((struct cmd *)mi->ctx)->image); else - while ((mi = TAILQ_FIRST(&menuq)) != NULL) { - TAILQ_REMOVE(&menuq, mi, entry); - free(mi); - } + menuq_clear(&menuq); } |