[PATCH] fix "-g workarea" on 64 bit systems

Helge Bahmann <[email protected]>
Newsgroups gmane.network.rdesktop.devel
Message-ID <[email protected]>
"XGetWindowProperty" returns CARDINAL values as "longs", which means that they 
are expanded to 64-bit values on the fly for 64-bit systems. The attached 
patch changes the use of "uint32" to "long" for fetching the _NET_WORKAREA 
property. (Yes this is counter-intuitive unfortunately).

Thanks & Best regards
Helge
-- 
Dr.-Ing.
Helge Bahmann
Berater
Geschäftsbereich Hochsicherheit
secunet Security Networks AG
Ammonstraße 74
01067 Dresden, Germany
Fon: +49 201 54 54-3586
Fax: +49 201 54 54-1323
Email: [email protected]

Sitz: Kronprinzenstraße 30, 45128 Essen
Amtsgericht Essen HRB 13615
Vorstand: Dr. Rainer Baumgart, Thomas Koelzer, Thomas Pleines
Aufsichtsratsvorsitzender: Dr. Karsten Ottenberg

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev

_______________________________________________
rdesktop-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdesktop-devel
rdesktop-1.6.0_64bit_window_properties.patch (text/x-diff, 858 B)
--- rdesktop-1.6.0/ewmhints.c	2010-02-11 12:22:03.000000000 +0100
+++ rdesktop-1.6.0/ewmhints.c	2010-02-11 12:23:37.000000000 +0100
@@ -119,7 +119,7 @@
 		return (-1);
 	}
 
-	current_desktop = *prop_return;
+	current_desktop = *(long *)prop_return;
 	XFree(prop_return);
 	return current_desktop;
 }
@@ -135,7 +135,7 @@
 	int current_desktop;
 	unsigned long nitems_return;
 	unsigned char *prop_return;
-	uint32 *return_words;
+	long *return_words;
 	const uint32 net_workarea_x_offset = 0;
 	const uint32 net_workarea_y_offset = 1;
 	const uint32 net_workarea_width_offset = 2;
@@ -158,7 +158,7 @@
 	if (current_desktop < 0)
 		return -1;
 
-	return_words = (uint32 *) prop_return;
+	return_words = (long *) prop_return;
 
 	*x = return_words[current_desktop * 4 + net_workarea_x_offset];
 	*y = return_words[current_desktop * 4 + net_workarea_y_offset];
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.