summaryrefslogtreecommitdiff
path: root/dw/fltkviewbase.cc
diff options
context:
space:
mode:
authorJorge Arellano Cid <jcid@dillo.org>2014-11-27 16:21:13 +0000
committerJorge Arellano Cid <jcid@dillo.org>2014-11-27 16:21:13 +0000
commitdccb7b38a3d112df48cb5eba3a5fd1c3b8396750 (patch)
tree612db474cf50cd1126fa2fd6602c92ad8f56a0a4 /dw/fltkviewbase.cc
parentcf60674a6fa8710a1c59def607be4b98c0756326 (diff)
further fix to fl_oldfocus replacement
http://lists.dillo.org/pipermail/dillo-dev/2014-November/010303.html for: "If an input has focus and you click on the page to give it focus instead, and then the cursor leaves the page and returns to it, the input is given focus instead."
Diffstat (limited to 'dw/fltkviewbase.cc')
-rw-r--r--dw/fltkviewbase.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/dw/fltkviewbase.cc b/dw/fltkviewbase.cc
index 68218800..4778cd87 100644
--- a/dw/fltkviewbase.cc
+++ b/dw/fltkviewbase.cc
@@ -365,6 +365,8 @@ int FltkViewBase::handle (int event)
// FLTK delivers UNFOCUS to the previously focused widget
if (find(Fl::focus()) < children())
focused_child = Fl::focus(); // remember the focused child!
+ else if (Fl::focus() == this)
+ focused_child = NULL; // no focused child this time
return 0;
case FL_KEYBOARD:
if (Fl::event_key() == FL_Tab)