diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2010-05-10 06:55:56 +0200 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2010-05-10 06:55:56 +0200 |
commit | 80a226f0f7b5405ba0974344995eb9b193cd005b (patch) | |
tree | 981d7b91a64a86414fb6d641c575401702ebd686 /dw/fltkviewport.cc | |
parent | 25cb8d05c3cbc4e497a0189abb836ea97e441dd0 (diff) |
avoid automatic focus of first child when window gets focus
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; |