FL/Fl_Sometimes_Input: Run callback on defocus (including Tab key press).
This commit is contained in:
parent
b855493014
commit
0f6d481f88
|
@ -75,13 +75,21 @@ public:
|
||||||
{
|
{
|
||||||
case FL_KEYDOWN:
|
case FL_KEYDOWN:
|
||||||
{
|
{
|
||||||
if ( r && Fl::event_key() == FL_Enter )
|
if ( ( Fl::event_key() == FL_Enter ||
|
||||||
|
Fl::event_key() == FL_Tab ) )
|
||||||
|
{
|
||||||
Fl::focus( NULL );
|
Fl::focus( NULL );
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return r;
|
||||||
}
|
}
|
||||||
case FL_FOCUS:
|
case FL_FOCUS:
|
||||||
case FL_UNFOCUS:
|
|
||||||
redraw();
|
redraw();
|
||||||
return 1;
|
return 1;
|
||||||
|
case FL_UNFOCUS:
|
||||||
|
do_callback();
|
||||||
|
return 1;
|
||||||
case FL_PUSH:
|
case FL_PUSH:
|
||||||
take_focus();
|
take_focus();
|
||||||
redraw();
|
redraw();
|
||||||
|
|
Loading…
Reference in New Issue