From 9d2da70d04114b6a3aac2b0787a9592ea2e286f2 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 14 Jan 2014 15:57:45 +0000 Subject: 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 --- src/Fl_x.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index 660a0a929..e1831b5c4 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -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]) -- cgit v1.2.3