[hackers] [dwm] potential crash fix if xinerama behaves broken, though I doubt it

From: Anselm R Garbe <garbeam_AT_gmail.com>
Date: Fri, 18 Jul 2008 19:18:50 +0000 (UTC)

changeset: 1314:f8c445284353
tag: tip
user: Anselm R Garbe <garbeam_AT_gmail.com>
date: Fri Jul 18 20:18:45 2008 +0100
files: dwm.c
description:
potential crash fix if xinerama behaves broken, though I doubt it

diff -r f51eb530cabb -r f8c445284353 dwm.c
--- a/dwm.c Fri Jul 18 10:57:32 2008 +0200
+++ b/dwm.c Fri Jul 18 20:18:45 2008 +0100
@@ -1562,8 +1562,7 @@
         XineramaScreenInfo *info = NULL;
 
         /* window area geometry */
- if(XineramaIsActive(dpy)) {
- info = XineramaQueryScreens(dpy, &n);
+ if(XineramaIsActive(dpy) && (info = XineramaQueryScreens(dpy, &n))) {
                 if(n > 1) {
                         int di, x, y;
                         unsigned int dui;
Received on Fri Jul 18 2008 - 19:18:50 UTC

This archive was generated by hypermail 2.2.0 : Fri Jul 18 2008 - 19:24:06 UTC