summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2008-04-09 18:10:48 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2008-04-09 18:10:48 +0000
commit5078b984f55284c0dab1bbbb202e2dca98a7c64e (patch)
tree1034ef49a4209db2121258f7c31fe28af0abcfdc
parent0b858658d32aed665dc992b0ff9a0fe1bce36857 (diff)
remove alt-tab menu
discussed with a few ok oga@
-rw-r--r--app/cwm/calmwm.h3
-rw-r--r--app/cwm/client.c87
2 files changed, 2 insertions, 88 deletions
diff --git a/app/cwm/calmwm.h b/app/cwm/calmwm.h
index 1bf3f2209..3c7b21a2b 100644
--- a/app/cwm/calmwm.h
+++ b/app/cwm/calmwm.h
@@ -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: calmwm.h,v 1.27 2008/04/07 23:47:09 simon Exp $
+ * $Id: calmwm.h,v 1.28 2008/04/09 18:10:47 okan Exp $
*/
#ifndef _CALMWM_H_
@@ -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);
diff --git a/app/cwm/client.c b/app/cwm/client.c
index d599684d9..264d0257c 100644
--- a/app/cwm/client.c
+++ b/app/cwm/client.c
@@ -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)
{