diff options
author | okan | 2008-04-09 18:10:47 +0000 |
---|---|---|
committer | okan | 2008-04-09 18:10:47 +0000 |
commit | 00b5e927adcf960e2d9e810f65c0a460e40d467c (patch) | |
tree | 5a7977c2499358b708c1c7d6762855267bbd7ccc /client.c | |
parent | d56e6a11e983b4dba8804af94848f249685247e3 (diff) | |
download | cwm-00b5e927adcf960e2d9e810f65c0a460e40d467c.tar.gz |
remove alt-tab menu
discussed with a few
ok oga@
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 87 |
1 files changed, 1 insertions, 86 deletions
@@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: client.c,v 1.14 2008/03/26 15:45:42 oga Exp $ + * $Id: client.c,v 1.15 2008/04/09 18:10:47 okan Exp $ */ #include "headers.h" @@ -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) { |