aboutsummaryrefslogtreecommitdiff
path: root/dw
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2010-05-10 06:55:56 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2010-05-10 06:55:56 +0200
commit80a226f0f7b5405ba0974344995eb9b193cd005b (patch)
tree981d7b91a64a86414fb6d641c575401702ebd686 /dw
parent25cb8d05c3cbc4e497a0189abb836ea97e441dd0 (diff)
avoid automatic focus of first child when window gets focus
Diffstat (limited to 'dw')
-rw-r--r--dw/fltkviewport.cc4
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;