summaryrefslogtreecommitdiff
path: root/app/cwm/calmwm.c
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2012-07-18 21:53:23 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2012-07-18 21:53:23 +0000
commit5789fd285715f26f5f998ee01db8b27c7848467c (patch)
tree7eeb5db397da758a20521eec15b9fb6c9685e681 /app/cwm/calmwm.c
parent4eea6b997a7570646a4b5f2241dc7840da23ed63 (diff)
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 'app/cwm/calmwm.c')
-rw-r--r--app/cwm/calmwm.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/app/cwm/calmwm.c b/app/cwm/calmwm.c
index 53f189618..73526ba0e 100644
--- a/app/cwm/calmwm.c
+++ b/app/cwm/calmwm.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: calmwm.c,v 1.63 2012/07/06 14:18:00 okan Exp $
+ * $OpenBSD: calmwm.c,v 1.64 2012/07/18 21:53:22 okan Exp $
*/
#include <sys/param.h>
@@ -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);
}