changeset: 2799:5be87959705e
tag: tip
user: Andrew Shadoura <Andrew.Shadoura_AT_gmail.com>
date: Tue May 31 05:25:14 2011 +0000
files: cmd/wmii/fns.h
description:
Fix XRandR segfault issue. Closes issue #231.
diff -r a8e14fe3b779 -r 5be87959705e cmd/wmii/fns.h
--- a/cmd/wmii/fns.h Sat Sep 17 17:58:32 2011 -0400
+++ b/cmd/wmii/fns.h Tue May 31 05:25:14 2011 +0000
@@ -27,7 +27,7 @@
with(int, __alive) \
with(Area*, __anext) \
for(s=0; _cond(s <= nscreens, 0); _cont(s++)) \
- for((a)=(s < nscreens ? (v)->areas[s] : v->floating), __anext=(a)->next; \
+ for((a)=(s < nscreens ? (v)->areas[s] : v->floating), __anext=((a)?(a)->next:NULL); \
_cond(a, 1); \
_cont(((a)=__anext) && (__anext=(a)->next)))
@@ -35,14 +35,14 @@
with(int, __alive) \
with(Area*, __anext) \
for(s=0; _cond(s < nscreens, 0); _cont(s++)) \
- for((a)=(v)->areas[s], __anext=(a)->next; \
+ for((a)=(v)->areas[s], __anext=((a)?(a)->next:NULL); \
_cond(a, 1); \
_cont(((a)=__anext) && (__anext=(a)->next)))
#define foreach_frame(v, s, a, f) \
with(Frame*, __fnext) \
foreach_area(v, s, a) \
- for((void)(((f)=(a)->frame) && (__fnext=(f)->anext)); \
+ for((void)(((f)=(a)->frame) && (__fnext=(f)?((f)->anext):NULL)); \
_cond(f, 2); \
_cont(((f)=__fnext) && (__fnext=(f)->anext)))
Received on Mon Sep 19 2011 - 22:15:13 CEST
This archive was generated by hypermail 2.2.0 : Mon Sep 19 2011 - 22:24:05 CEST