summaryrefslogtreecommitdiff
path: root/x11/xphoon/patches/patch-ag
blob: 91545c569c0b278520d75d28059c9b67b2ec66d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
$NetBSD: patch-ag,v 1.1 2008/07/28 02:45:56 dholland Exp $

--- vroot.h.orig	1991-09-18 15:49:11.000000000 -0400
+++ vroot.h	2008-07-27 22:17:45.000000000 -0400
@@ -50,7 +50,7 @@ VirtualRootWindowOfScreen(screen)
 	if (screen != save_screen) {
 		Display *dpy = DisplayOfScreen(screen);
 		Atom __SWM_VROOT = None;
-		int i;
+		unsigned i;
 		Window rootReturn, parentReturn, *children;
 		unsigned int numChildren;
 
@@ -64,14 +64,16 @@ VirtualRootWindowOfScreen(screen)
 				Atom actual_type;
 				int actual_format;
 				unsigned long nitems, bytesafter;
-				Window *newRoot = (Window *)0;
+				Window *newRoot;
+				unsigned char *newRootTmp = NULL;
 
 				if (XGetWindowProperty(dpy, children[i],
 					__SWM_VROOT, 0, 1, False, XA_WINDOW,
 					&actual_type, &actual_format,
 					&nitems, &bytesafter,
-					(unsigned char **) &newRoot) == Success
-				    && newRoot) {
+					&newRootTmp) == Success
+				    && newRootTmp) {
+				    newRoot = (Window *) newRootTmp;
 				    root = *newRoot;
 				    break;
 				}