mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
convert globals from G_foo to Foo, as per TODO.
"looks good" pedro@, ok matthieu@
This commit is contained in:
22
screen.c
22
screen.c
@ -10,14 +10,14 @@
|
||||
#include "headers.h"
|
||||
#include "calmwm.h"
|
||||
|
||||
extern struct screen_ctx_q G_screenq;
|
||||
extern struct screen_ctx *G_curscreen;
|
||||
extern struct screen_ctx_q Screenq;
|
||||
extern struct screen_ctx *Curscreen;
|
||||
|
||||
static void
|
||||
_clearwindow_cb(int sig)
|
||||
{
|
||||
struct screen_ctx *sc = screen_current();
|
||||
XUnmapWindow(G_dpy, sc->infowin);
|
||||
XUnmapWindow(X_Dpy, sc->infowin);
|
||||
}
|
||||
|
||||
struct screen_ctx *
|
||||
@ -25,18 +25,18 @@ screen_fromroot(Window rootwin)
|
||||
{
|
||||
struct screen_ctx *sc;
|
||||
|
||||
TAILQ_FOREACH(sc, &G_screenq, entry)
|
||||
TAILQ_FOREACH(sc, &Screenq, entry)
|
||||
if (sc->rootwin == rootwin)
|
||||
return (sc);
|
||||
|
||||
/* XXX FAIL HERE */
|
||||
return (TAILQ_FIRST(&G_screenq));
|
||||
return (TAILQ_FIRST(&Screenq));
|
||||
}
|
||||
|
||||
struct screen_ctx *
|
||||
screen_current(void)
|
||||
{
|
||||
return (G_curscreen);
|
||||
return (Curscreen);
|
||||
}
|
||||
|
||||
void
|
||||
@ -47,7 +47,7 @@ screen_updatestackingorder(void)
|
||||
u_int nwins, i, s;
|
||||
struct client_ctx *cc;
|
||||
|
||||
if (!XQueryTree(G_dpy, sc->rootwin, &w0, &w1, &wins, &nwins))
|
||||
if (!XQueryTree(X_Dpy, sc->rootwin, &w0, &w1, &wins, &nwins))
|
||||
return;
|
||||
|
||||
for (s = 0, i = 0; i < nwins; i++) {
|
||||
@ -70,7 +70,7 @@ screen_init(void)
|
||||
|
||||
sc->cycle_client = NULL;
|
||||
|
||||
sc->infowin = XCreateSimpleWindow(G_dpy, sc->rootwin, 0, 0,
|
||||
sc->infowin = XCreateSimpleWindow(X_Dpy, sc->rootwin, 0, 0,
|
||||
1, 1, 1, sc->blackpixl, sc->whitepixl);
|
||||
|
||||
/* XXX - marius. */
|
||||
@ -86,15 +86,15 @@ screen_infomsg(char *msg)
|
||||
int dy, dx;
|
||||
struct fontdesc *font = DefaultFont;
|
||||
|
||||
XUnmapWindow(G_dpy, sc->infowin);
|
||||
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(G_dpy, sc->infowin, 0, 0, dx, dy);
|
||||
XMapRaised(G_dpy, sc->infowin);
|
||||
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);
|
||||
|
Reference in New Issue
Block a user