remove alt-tab menu

discussed with a few

ok oga@
This commit is contained in:
okan 2008-04-09 18:10:47 +00:00
parent eb77aabea1
commit 343ec1bb4f
2 changed files with 0 additions and 86 deletions

View File

@ -352,7 +352,6 @@ Pixmap client_bg_pixmap(struct client_ctx *);
void client_map(struct client_ctx *cc);
void client_mtf(struct client_ctx *cc);
struct client_ctx *client_cyclenext(int reverse);
void client_cycleinfo(struct client_ctx *cc);
void client_altrelease();
struct client_ctx *client_mrunext(struct client_ctx *cc);
struct client_ctx *client_mruprev(struct client_ctx *cc);

View File

@ -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)
{