mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
Remove screen_infomsg(), nothing uses it.
ok okan.
This commit is contained in:
parent
642afbdf8c
commit
f67772be65
2
calmwm.h
2
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);
|
||||
|
16
client.c
16
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);
|
||||
@ -675,20 +675,6 @@ client__cycle(struct client_ctx *cc,
|
||||
return (cc != save ? cc : NULL);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
8
group.c
8
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) ? \
|
||||
|
38
screen.c
38
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user