diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2014-11-18 12:53:29 -0300 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2014-11-18 12:53:29 -0300 |
commit | 727bfb87009cc0e5ef2e0ce1a363910fb3d6b311 (patch) | |
tree | ac4e14f4ecf70c74e8f98e8009a3a11e5436f811 /dw/fltkviewbase.cc | |
parent | 2db5a9e3e790863db2f67e727512f2373d4c82dc (diff) |
Fix a problem with FLTK's fl_oldfocus variable (now private)
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/fltkviewbase.cc')
-rw-r--r-- | dw/fltkviewbase.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/dw/fltkviewbase.cc b/dw/fltkviewbase.cc index f7e331fc..9ec5a71a 100644 --- a/dw/fltkviewbase.cc +++ b/dw/fltkviewbase.cc @@ -69,7 +69,7 @@ FltkViewBase::FltkViewBase (int x, int y, int w, int h, const char *label): canvasHeight = 1; bgColor = FL_WHITE; mouse_x = mouse_y = 0; - // focused_child = NULL; + focused_child = NULL; exposeArea = NULL; if (backBuffer == NULL) { backBuffer = new BackBuffer (); @@ -355,8 +355,6 @@ int FltkViewBase::handle (int event) case FL_LEAVE: theLayout->leaveNotify (this, getDwButtonState ()); break; -#if 0 - // BUG: starting with fltk-1.3.3, we can't use fl_oldfocus. case FL_FOCUS: if (focused_child && find(focused_child) < children()) { /* strangely, find() == children() if the child is not found */ @@ -364,9 +362,11 @@ int FltkViewBase::handle (int event) } return 1; case FL_UNFOCUS: - focused_child = fl_oldfocus; + // was: focused_child = fl_oldfocus; + for (Fl_Widget *p = this; p; p = p->parent()) + focused_child = p; + return 0; -#endif case FL_KEYBOARD: if (Fl::event_key() == FL_Tab) return manageTabToFocus(); |