diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2014-11-25 19:09:54 +0000 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2014-11-25 19:09:54 +0000 |
commit | 20ce82ab74c1732359c9fd8ae91e8d4805a20150 (patch) | |
tree | 63245348b64309e389daa4b1b244763ecaba2e05 /dw | |
parent | ccf5cb61e69cc93da258db1a84b191be48d23fa9 (diff) |
Fix a problem with FLTK's fl_oldfocus variable
http://lists.dillo.org/pipermail/dillo-dev/2014-November/010299.html
and, from commit text for changeset eb902ac9fc66
"Starting with fltk-1.3.3, we can't use fl_oldfocus, this patch
fixes this problem.
IOW. this patch is necessary to link with fltk-1.3.3."
Diffstat (limited to 'dw')
-rw-r--r-- | dw/fltkviewbase.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dw/fltkviewbase.cc b/dw/fltkviewbase.cc index 30a19d58..68218800 100644 --- a/dw/fltkviewbase.cc +++ b/dw/fltkviewbase.cc @@ -27,8 +27,6 @@ #include <stdio.h> #include "../lout/msg.h" -extern Fl_Widget* fl_oldfocus; - using namespace lout::object; using namespace lout::container::typed; @@ -364,7 +362,9 @@ int FltkViewBase::handle (int event) } return 1; case FL_UNFOCUS: - focused_child = fl_oldfocus; + // FLTK delivers UNFOCUS to the previously focused widget + if (find(Fl::focus()) < children()) + focused_child = Fl::focus(); // remember the focused child! return 0; case FL_KEYBOARD: if (Fl::event_key() == FL_Tab) |