From 698ec259afd804316922a9092493b69e0470292f Mon Sep 17 00:00:00 2001 From: Anselm R Garbe Date: Fri, 18 Jul 2008 20:20:19 +0100 Subject: similiar change as in dwm --- dmenu.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dmenu.c b/dmenu.c index 863a262..1206e95 100644 --- a/dmenu.c +++ b/dmenu.c @@ -587,11 +587,12 @@ run(void) { void setup(Bool topbar) { int i, j, x, y; - XModifierKeymap *modmap; - XSetWindowAttributes wa; #if XINERAMA + int n; XineramaScreenInfo *info = NULL; #endif + XModifierKeymap *modmap; + XSetWindowAttributes wa; /* init modifier map */ modmap = XGetModifierMapping(dpy); @@ -618,10 +619,8 @@ setup(Bool topbar) { /* menu window geometry */ mh = dc.font.height + 2; #if XINERAMA - if(XineramaIsActive(dpy)) { - int n; + if(XineramaIsActive(dpy) && (info = XineramaQueryScreens(dpy, &n))) { i = 0; - info = XineramaQueryScreens(dpy, &n); if(n > 1) { int di; unsigned int dui; -- cgit v1.2.3-13-gbd6f