diff options
author | jasper | 2007-05-28 18:34:27 +0000 |
---|---|---|
committer | jasper | 2007-05-28 18:34:27 +0000 |
commit | 4cf5a98fa42b6d99a178eda07a9e42f91e02c97d (patch) | |
tree | 2e025de77387e856ddb58f0b918477d8da17b3c6 /screen.c | |
parent | 5116ffb4630d2bcf16cd2ab429dc6baba29e40bb (diff) | |
download | cwm-4cf5a98fa42b6d99a178eda07a9e42f91e02c97d.tar.gz |
convert globals from G_foo to Foo, as per TODO.
"looks good" pedro@, ok matthieu@
Diffstat (limited to '')
-rw-r--r-- | screen.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -4,20 +4,20 @@ * Copyright (c) 2004 Marius Aamodt Eriksen <marius@monkey.org> * All rights reserved. * - * $Id: screen.c,v 1.1.1.1 2007/04/27 17:58:48 bernd Exp $ + * $Id: screen.c,v 1.2 2007/05/28 18:34:27 jasper Exp $ */ #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); |