about summary refs log tree commit diff
path: root/calmwm.c
diff options
context:
space:
mode:
authorokan <okan>2012-07-18 21:53:22 +0000
committerokan <okan>2012-07-18 21:53:22 +0000
commit013497c79cdb17d8a40f53d5535b4ba8362f0ef5 (patch)
tree5a36abc90e45247a9fb19240ad0824e752724d74 /calmwm.c
parent3f956098d9e8382d27a81aedd1e77220dff4865f (diff)
downloadcwm-013497c79cdb17d8a40f53d5535b4ba8362f0ef5.tar.gz
cwm-013497c79cdb17d8a40f53d5535b4ba8362f0ef5.tar.xz
cwm-013497c79cdb17d8a40f53d5535b4ba8362f0ef5.zip
Further simplify Xinerama init and re-init on XRR events.
While testing for Xinerama during setup was done display-wide, each time
XineramaQueryScreens() is called either in start-up or due to an XRR
event, the library re-tests for the Xinerama extension anyway before
moving on; so the initial test is redundant and allows another global to
go away with one other change: always fill in sc->xinerama (and _no),
regardless of the success of malloc in XineramaQueryScreens(), and use
it to see if Xinerama dimensions exist when asked by client and/or menu
code.
Diffstat (limited to 'calmwm.c')
-rw-r--r--calmwm.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/calmwm.c b/calmwm.c
index 4ee7253..911c280 100644
--- a/calmwm.c
+++ b/calmwm.c
@@ -44,7 +44,7 @@ Cursor				 Cursor_resize;
 struct screen_ctx_q		 Screenq = TAILQ_HEAD_INITIALIZER(Screenq);
 struct client_ctx_q		 Clientq = TAILQ_HEAD_INITIALIZER(Clientq);
 
-int				 HasXinerama, HasRandr, Randr_ev;
+int				 HasRandr, Randr_ev;
 struct conf			 Conf;
 
 static void	sigchld_cb(int);
@@ -97,7 +97,7 @@ main(int argc, char **argv)
 static void
 dpy_init(const char *dpyname)
 {
-	int	i, fake;
+	int	i;
 
 	XSetErrorHandler(x_errorhandler);
 
@@ -110,9 +110,6 @@ dpy_init(const char *dpyname)
 	XSync(X_Dpy, False);
 	XSetErrorHandler(x_errorhandler);
 
-	if (XineramaQueryExtension(X_Dpy, &fake, &fake) == 1 &&
-	    ((HasXinerama = XineramaIsActive(X_Dpy)) == 1))
-		HasXinerama = 1;
 	HasRandr = XRRQueryExtension(X_Dpy, &Randr_ev, &i);
 }