diff options
author | Okan Demirmen <okan@cvs.openbsd.org> | 2017-12-12 15:37:17 +0000 |
---|---|---|
committer | Okan Demirmen <okan@cvs.openbsd.org> | 2017-12-12 15:37:17 +0000 |
commit | 4c6dfef7b73d1680e925e0d5429b19f4cd0d1b62 (patch) | |
tree | 6962182c299582862899398fae71c1fc7fa30034 /app | |
parent | d806125849a4c9dc6e066ead712d89ea91b9d66b (diff) |
clean up after previous (noprompt removal)
Diffstat (limited to 'app')
-rw-r--r-- | app/cwm/menu.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/app/cwm/menu.c b/app/cwm/menu.c index c8b7a9f84..f452abb93 100644 --- a/app/cwm/menu.c +++ b/app/cwm/menu.c @@ -16,7 +16,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: menu.c,v 1.103 2017/12/11 20:58:18 okan Exp $ + * $OpenBSD: menu.c,v 1.104 2017/12/12 15:37:16 okan Exp $ */ #include <sys/types.h> @@ -88,10 +88,9 @@ menu_filter(struct screen_ctx *sc, struct menu_q *menuq, const char *prompt, TAILQ_INIT(&resultq); - (void)memset(&mc, 0, sizeof(mc)); - xu_ptr_getpos(sc->rootwin, &xsave, &ysave); + (void)memset(&mc, 0, sizeof(mc)); mc.sc = sc; mc.flags = flags; mc.match = match; @@ -337,21 +336,17 @@ menu_draw(struct menu_ctx *mc, struct menu_q *menuq, struct menu_q *resultq) (void)snprintf(mc->dispstr, sizeof(mc->dispstr), "%s%s%s%s", mc->promptstr, PROMPT_SCHAR, mc->searchstr, PROMPT_ECHAR); - XftTextExtentsUtf8(X_Dpy, sc->xftfont, (const FcChar8*)mc->dispstr, strlen(mc->dispstr), &extents); - mc->geom.w = extents.xOff; mc->geom.h = sc->xftfont->height + 1; mc->num = 1; TAILQ_FOREACH(mi, resultq, resultentry) { (*mc->print)(mi, mc->listing); - XftTextExtentsUtf8(X_Dpy, sc->xftfont, (const FcChar8*)mi->print, MIN(strlen(mi->print), MENU_MAXENTRY), &extents); - mc->geom.w = MAX(mc->geom.w, extents.xOff); mc->geom.h += sc->xftfont->height + 1; mc->num++; |