DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2457
Version: 2.0-current


In CreateWindow for x11, the icon data is being treated as an (unsigned *),
but X says it should be (unsigned long *).  The size of long [typically]
changes from 32bit to 64bit.

This patch fixes the problem that I've seen.  Obviously, since the window
icon functionality still requires a bit of care with the data passed in,
this would not fix problems when the caller isn't using 64bit quantities
as they should.  But when the caller does things correctly, and fltk does
things correctly, then it works.


Link: http://www.fltk.org/str.php?L2457
Version: 2.0-current
--- fltk-2.0.x-r6786.orig/src/x11/run.cxx       2008-09-15 01:21:01.000000000 
-0500
+++ fltk-2.0.x-r6786/src/x11/run.cxx    2010-09-01 11:03:09.000000000 -0500
@@ -2169,7 +2169,7 @@
       // is allowed since otherwise the size of the data cannot be
       // figured out...
       // warning: this code assumes sizeof(unsigned)==4!
-      unsigned* data = (unsigned*)(window->icon());
+      unsigned long* data = (unsigned long*)(window->icon());
       unsigned size = data[0]*data[1]+2;
       static Atom _NET_WM_ICON = 0;
       if (!_NET_WM_ICON) _NET_WM_ICON =
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to