From 41200e99e2cf274538d8533ee449dfa610932e07 Mon Sep 17 00:00:00 2001 From: okan Date: Fri, 12 Apr 2013 14:46:30 +0000 Subject: push Screenq into screen_init --- screen.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'screen.c') diff --git a/screen.c b/screen.c index e7ed769..601d60e 100644 --- a/screen.c +++ b/screen.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: screen.c,v 1.45 2013/01/08 04:12:51 okan Exp $ + * $OpenBSD: screen.c,v 1.46 2013/04/12 14:46:30 okan Exp $ */ #include @@ -31,13 +31,16 @@ #include "calmwm.h" void -screen_init(struct screen_ctx *sc, u_int which) +screen_init(u_int which) { + struct screen_ctx *sc; Window *wins, w0, w1; XWindowAttributes winattr; XSetWindowAttributes rootattr; u_int nwins, i; + sc = xcalloc(1, sizeof(*sc)); + sc->which = which; sc->visual = DefaultVisual(X_Dpy, sc->which); sc->colormap = DefaultColormap(X_Dpy, sc->which); @@ -84,6 +87,8 @@ screen_init(struct screen_ctx *sc, u_int which) if (HasRandr) XRRSelectInput(X_Dpy, sc->rootwin, RRScreenChangeNotifyMask); + TAILQ_INSERT_TAIL(&Screenq, sc, entry); + XSync(X_Dpy, False); } -- cgit v1.2.3-2-gb3c3