32-bit properties are always represented by a long. Using

unsigned causes us to read the wrong values on x86_64.
The length is also defined as the number of 32-bit values,
not the number of bytes.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10058 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Pierre Ossman 2014-01-14 15:57:45 +00:00
parent 452ce6e502
commit 9d2da70d04

View File

@ -709,7 +709,7 @@ static void fl_init_workarea() {
Atom actual;
unsigned long count, remaining;
int format;
unsigned *xywh = 0;
long *xywh = 0;
/* If there are several screens, the _NET_WORKAREA property
does not give the work area of the main screen, but that of all screens together.
@ -717,7 +717,7 @@ static void fl_init_workarea() {
and fall back to the main screen full area when there are several screens.
*/
if (Fl::screen_count() > 1 || XGetWindowProperty(fl_display, RootWindow(fl_display, fl_screen),
fl_NET_WORKAREA, 0, 4 * sizeof(unsigned), False,
fl_NET_WORKAREA, 0, 4, False,
XA_CARDINAL, &actual, &format, &count, &remaining,
(unsigned char **)&xywh) || !xywh || !xywh[2] ||
!xywh[3])