DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New] Link: http://www.fltk.org/str.php?L2366 Version: 1.3-current While looking into STR#2444, I've been looking closely at this section of code, and although I don't know much about X11 with respect to event handling myself, I think the fix is correct. What we have now: ---- if (fl_xim_ic) { if (!filtered) { <xim style handling of keystroke> } else { <-- PROBLEM <call XKeycodeToKeysym() to convert keycode to keysym> } } else { <non-xim handling of keystroke> } ---- The checking of (!filtered) is to see if XFilterEvent() told us to ignore the event or not. My understanding of XFilterEvent() is that if that if it returns true, we should be ignoring the event /completely/. Yet with the above "else", we call XKeycodeToKeysym() when 'filtered' is set. My read of the code is 'filtered' is never true at this point in the code, because above it, where filtered gets set, we have: ---- filtered = XFilterEvent((XEvent *)&xevent, 0); if (filtered) { return 1; } ---- I propose we change that to simply: ---- if ( XFilterEvent((XEvent *)&xevent, 0) ) return(1); ---- ..and remove all references to 'filtered', because it's never true. I've attached an alternate patch, "str2366-erco.patch" that rips out the unused variable and related logic, while keeping the spirit of the OP's fix. It also fixes some indenting that seems to indicate a bad code merge might have caused the whole problem to begin with. Link: http://www.fltk.org/str.php?L2366 Version: 1.3-current _______________________________________________ fltk-bugs mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-bugs
