about summary refs log tree commit diff
path: root/screen.c
diff options
context:
space:
mode:
authorokan <okan>2013-04-14 16:13:17 +0000
committerokan <okan>2013-04-14 16:13:17 +0000
commit6f185bb03c3ba0928ba6254485c710103379bd1a (patch)
treea1ad2c61058ca193942a4a00757ff25bd7c9a784 /screen.c
parenta957ed7c7dcc287afcf33547326717701a0445de (diff)
parent16ed8bf8e4f561049b732b326f3d0ee475fe13f6 (diff)
downloadcwm-6f185bb03c3ba0928ba6254485c710103379bd1a.tar.gz
cwm-6f185bb03c3ba0928ba6254485c710103379bd1a.tar.xz
cwm-6f185bb03c3ba0928ba6254485c710103379bd1a.zip
cvsimport
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/screen.c b/screen.c
index f63032e..64c4280 100644
--- a/screen.c
+++ b/screen.c
@@ -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);
 }