diff options
-rw-r--r-- | calmwm.h | 2 | ||||
-rw-r--r-- | client.c | 16 | ||||
-rw-r--r-- | group.c | 8 | ||||
-rw-r--r-- | screen.c | 38 | ||||
-rw-r--r-- | xevents.c | 1 |
5 files changed, 1 insertions, 64 deletions
diff --git a/calmwm.h b/calmwm.h index b2967e8..9bf2f25 100644 --- a/calmwm.h +++ b/calmwm.h @@ -350,7 +350,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_altrelease(); struct client_ctx *client_mrunext(struct client_ctx *cc); struct client_ctx *client_mruprev(struct client_ctx *cc); void client_gethints(struct client_ctx *cc); @@ -420,7 +419,6 @@ void screen_init(void); struct screen_ctx *screen_fromroot(Window); struct screen_ctx *screen_current(void); void screen_updatestackingorder(void); -void screen_infomsg(char *); void conf_setup(struct conf *, const char *); int conf_get_int(struct client_ctx *, enum conftype); diff --git a/client.c b/client.c index ef069fb..77efde3 100644 --- a/client.c +++ b/client.c @@ -610,7 +610,7 @@ client_cyclenext(int reverse) /* TODO: maybe this should just be a CIRCLEQ. */ - if (!(cc = _curcc)) { + if ((cc = client_current()) == NULL) { if (TAILQ_EMPTY(&Clientq)) return(NULL); cc = TAILQ_FIRST(&Clientq); @@ -676,20 +676,6 @@ client__cycle(struct client_ctx *cc, } void -client_altrelease() -{ - struct client_ctx *cc = _curcc; - struct screen_ctx *sc; - - if (cc == NULL) - return; - sc = CCTOSC(cc); - - XUnmapWindow(X_Dpy, sc->infowin); - XReparentWindow(X_Dpy, sc->infowin, sc->rootwin, 0, 0); -} - -void client_placecalc(struct client_ctx *cc) { struct screen_ctx *sc = CCTOSC(cc); diff --git a/group.c b/group.c index c00e505..59aec57 100644 --- a/group.c +++ b/group.c @@ -182,9 +182,6 @@ void group_hidetoggle(int idx) { struct group_ctx *gc; -#ifdef notyet - char buf[128]; -#endif if (idx < 0 || idx >= CALMWM_NGROUPS) err(1, "group_hidetoggle: index out of range (%d)", idx); @@ -200,11 +197,6 @@ group_hidetoggle(int idx) if (TAILQ_EMPTY(&gc->clients)) Group_active = gc; } - -#ifdef notyet - snprintf(buf, sizeof(buf), "Group %d", idx + 1); - screen_infomsg(buf); -#endif } #define GROUP_NEXT(gc, fwd) (fwd) ? \ diff --git a/screen.c b/screen.c index 8f0ef1c..78344af 100644 --- a/screen.c +++ b/screen.c @@ -24,13 +24,6 @@ extern struct screen_ctx_q Screenq; extern struct screen_ctx *Curscreen; -static void -_clearwindow_cb(int sig) -{ - struct screen_ctx *sc = screen_current(); - XUnmapWindow(X_Dpy, sc->infowin); -} - struct screen_ctx * screen_fromroot(Window rootwin) { @@ -79,35 +72,4 @@ screen_init(void) struct screen_ctx *sc = screen_current(); sc->cycle_client = NULL; - - sc->infowin = XCreateSimpleWindow(X_Dpy, sc->rootwin, 0, 0, - 1, 1, 1, sc->blackpixl, sc->whitepixl); - - /* XXX - marius. */ - if (signal(SIGALRM, _clearwindow_cb) == SIG_ERR) - err(1, "signal"); -} - -void -screen_infomsg(char *msg) -{ - struct screen_ctx *sc = screen_current(); - char buf[1024]; - int dy, dx; - struct fontdesc *font = DefaultFont; - - XUnmapWindow(X_Dpy, sc->infowin); - alarm(0); - - snprintf(buf, sizeof(buf), ">%s", msg); - dy = font_ascent(font) + font_descent(font) + 1; - dx = font_width(font, buf, strlen(buf)); - - XMoveResizeWindow(X_Dpy, sc->infowin, 0, 0, dx, dy); - XMapRaised(X_Dpy, sc->infowin); - - font_draw(font, buf, strlen(buf), sc->infowin, - 0, font_ascent(font) + 1); - - alarm(1); } diff --git a/xevents.c b/xevents.c index 59a4671..5afba57 100644 --- a/xevents.c +++ b/xevents.c @@ -421,7 +421,6 @@ xev_handle_keyrelease(struct xevent *xev, XEvent *ee) * how/when to mtf. */ client_mtf(NULL); - client_altrelease(); out: xev_register(xev); |