> BTW I've noticed something strange which has not relation to current
> issue. In all the cited programs so far (this is also reproducible in this
> program) if one types something in input box, and then holds "backspace"
> key to delete that strng and holds it a little longer ...
> ... and program wont quit on subsequent "escape" key presses. Is
> this a bug in FLTK 2.x?
Yo, as far as X11 implementation of fltk2 is involved
this seems to be a bug.
This is not limited to the Backspace key, but to all keys that increments
a key-repeat counter, and can be seen in all demo apps too.
Holding any key a longer time (so that there is a key-repeat) disables
all global shortcuts (f.e. esc to quit application)
A simple grep shows: $ grep -r key_rep .
./win32/run.cxx: e_key_repeated++;
./win32/run.cxx: e_key_repeated = 0;
./osx/run.cxx: e_key_repeated = 0;
./osx/run.cxx: e_key_repeated++;
./x11/run.cxx: e_key_repeated++;
so there seems to be a missing e_key_repeated = 0; in /x11/run.cxx
and i guess following code for the KeyPress handler will fix that issue:
if (fl_key_vector[keycode/8]&(1<<(keycode%8))) {
e_key_repeated++;
recent_keycode = 0;
} else {
// e_clicks = 0; <- is this a typo ????
e_key_repeated = 0; // add key_rep reset
recent_keycode = keycode;
}
greetings
Gombok
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk