convert globals from G_foo to Foo, as per TODO.

"looks good" pedro@, ok matthieu@
This commit is contained in:
jasper
2007-05-28 18:34:27 +00:00
parent 4a498a4c60
commit 9006bbf20b
17 changed files with 370 additions and 372 deletions

View File

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