diff options
Diffstat (limited to 'dw/fltkviewport.cc')
-rw-r--r-- | dw/fltkviewport.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dw/fltkviewport.cc b/dw/fltkviewport.cc index aa1e8120..a8555c60 100644 --- a/dw/fltkviewport.cc +++ b/dw/fltkviewport.cc @@ -241,8 +241,8 @@ int FltkViewport::handle (int event) * and thereby unfocus any form widgets. * Otherwise we let fltk do the focus handling. */ - if (::fltk::event_button() == ::fltk::LeftButton) { - set_focus(this); + if (::fltk::event_button() == ::fltk::LeftButton || focus_index() < 0) { + focus_index(-1); return 1; } break; |