DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New] Link: http://www.fltk.org/str.php?L2419 Version: 1.3-current Some info I found so far: XChangeProperty is used here to tell the "requestor" which type of selection we have (in this case fl_XaUtf8String). The format argument of this call must be size of the property value (Atom a) in bytes, and thus it is (has always been) sizeof(Atom)*8. So far, so good... The problem seems to be that the format argument must be one of 8, 16, or 32, but is 64 (0x40). One solution *might* be to replace the two lines in question with: int a = fl_XaUtf8String; //XA_STRING; XChangeProperty(fl_display, e.requestor, e.property, XA_ATOM, sizeof(a)*8, 0, (unsigned char*)&a, 1); but this could give another warning, so that we would maybe need a cast: int a = (int)fl_XaUtf8String; //XA_STRING; To verify this, would you please add the following printf statement (before changing anything) just before the XChangeProperty call and report what it prints on your 64-bit system? Atom a = fl_XaUtf8String; //XA_STRING; printf ("sizeof(Atom)=%d, sizeof(unsigned long)=%d, a=%ld\n", sizeof(Atom), sizeof(unsigned long), a); XChangeProperty(fl_display, e.requestor, e.property, XA_ATOM, sizeof(Atom)*8, 0, (unsigned char*)&a, 1); $ test/input sizeof(Atom)=4, sizeof(unsigned long)=4, a=234 sizeof(Atom)=4, sizeof(unsigned long)=4, a=234 This is my code and what it reports. --- With the code changed like this: unsigned int a = fl_XaUtf8String; //XA_STRING; printf ("sizeof(a)=%d, sizeof(unsigned long)=%d, a=%u\n", sizeof(a), sizeof(unsigned long), a); XChangeProperty(fl_display, e.requestor, e.property, XA_ATOM, sizeof(a)*8, 0, (unsigned char*)&a, 1); ... it reports: $ test/input sizeof(a)=4, sizeof(unsigned long)=4, a=234 sizeof(a)=4, sizeof(unsigned long)=4, a=234 Note: I used test/input, entered some characters in one of the input fields, marked some text, and pressed ctrl/c. What does it report with the changed code, and does it work? Link: http://www.fltk.org/str.php?L2419 Version: 1.3-current _______________________________________________ fltk-bugs mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-bugs
