From 4cf5a98fa42b6d99a178eda07a9e42f91e02c97d Mon Sep 17 00:00:00 2001 From: jasper Date: Mon, 28 May 2007 18:34:27 +0000 Subject: convert globals from G_foo to Foo, as per TODO. "looks good" pedro@, ok matthieu@ --- screen.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'screen.c') diff --git a/screen.c b/screen.c index 3480f3f..fb05636 100644 --- a/screen.c +++ b/screen.c @@ -4,20 +4,20 @@ * Copyright (c) 2004 Marius Aamodt Eriksen * 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); -- cgit v1.2.3-2-gb3c3