diff options
author | okan <okan> | 2008-04-09 18:10:47 +0000 |
---|---|---|
committer | okan <okan> | 2008-04-09 18:10:47 +0000 |
commit | 343ec1bb4fa42eabd35222b4dc1bd53fc7690026 (patch) | |
tree | 16a58b2cbabcd912f4cb71da8d6167777cd92079 /client.c | |
parent | eb77aabea1029d97489611c71c11ab32e7329cee (diff) | |
download | cwm-343ec1bb4fa42eabd35222b4dc1bd53fc7690026.tar.gz cwm-343ec1bb4fa42eabd35222b4dc1bd53fc7690026.tar.xz cwm-343ec1bb4fa42eabd35222b4dc1bd53fc7690026.zip |
remove alt-tab menu
discussed with a few ok oga@
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/client.c b/client.c index b6f7aa7..6691c6b 100644 --- a/client.c +++ b/client.c @@ -635,94 +635,9 @@ client_cyclenext(int reverse) client_ptrwarp(sc->cycle_client); sc->altpersist = 1; /* This is reset when alt is let go... */ - /* Draw window. */ - client_cycleinfo(sc->cycle_client); - return (sc->cycle_client); } -/* - * XXX - have to have proper exposure handling here. we will probably - * have to do this by registering with the event loop a function to - * redraw, then match that on windows. - */ - -void -client_cycleinfo(struct client_ctx *cc) -{ -#define LISTSIZE 3 - int w, h, nlines, i, n, oneh, curn = -1, x, y, diff; - struct client_ctx *ccc, *list[LISTSIZE]; - struct screen_ctx *sc = CCTOSC(cc); - struct fontdesc *font = DefaultFont; - - memset(list, 0, sizeof(list)); - - nlines = 0; - TAILQ_FOREACH(ccc, &sc->mruq, mru_entry) { - if (!ccc->flags & CLIENT_HIDDEN) { - if (++nlines == LISTSIZE) - break; - } - } - - oneh = font_ascent(font) + font_descent(font) + 1; - h = nlines*oneh; - - list[1] = cc; - - if (nlines > 1) - list[2] = client__cycle(cc, &client_mrunext); - if (nlines > 2) - list[0] = client__cycle(cc, &client_mruprev); - - w = 0; - for (i = 0; i < sizeof(list)/sizeof(list[0]); i++) { - if ((ccc = list[i]) == NULL) - continue; - w = MAX(w, font_width(font, ccc->name, strlen(ccc->name))); - } - - w += 4; - - /* try to fit. */ - - if ((x = cc->ptr.x) < 0 || (y = cc->ptr.y) < 0) { - x = cc->geom.width / 2; - y = cc->geom.height / 2; - } - - if ((diff = cc->geom.width - (x + w)) < 0) - x += diff; - - if ((diff = cc->geom.height - (y + h)) < 0) - y += diff; - - /* Don't hide the beginning of the window names */ - if (x < 0) - x = 0; - - XReparentWindow(X_Dpy, sc->infowin, cc->win, 0, 0); - XMoveResizeWindow(X_Dpy, sc->infowin, x, y, w, h); - XMapRaised(X_Dpy, sc->infowin); - XClearWindow(X_Dpy, sc->infowin); - - for (i = 0, n = 0; i < sizeof(list)/sizeof(list[0]); i++) { - if ((ccc = list[i]) == NULL) - continue; - font_draw(font, ccc->name, strlen(ccc->name), sc->infowin, - 2, n*oneh + font_ascent(font) + 1); - if (i == 1) - curn = n; - n++; - } - - assert(curn != -1); - - /* Highlight the current entry. */ - XFillRectangle(X_Dpy, sc->infowin, sc->hlgc, 0, curn*oneh, w, oneh); -} - struct client_ctx * client_mrunext(struct client_ctx *cc) { |