From 165d9c378d9d4153b7396066bb0651737ea17add Mon Sep 17 00:00:00 2001 From: Jorge Arellano Cid Date: Fri, 8 Jul 2011 11:56:42 -0400 Subject: Workaround: fixes hiding a tooltip with the keyboard or mousewheel This is a complex problem where it is not clear whether the bug lies in dillo, fltk, or in their interaction. Tooltip handling is fuzzy in FLTK, and there are glitches in it; trying to "fix" it inside dillo produces partial solutions. OTOH, although implementing custom tooltip handling adds complexity, it provides a solution that so far works in all the testcases. --- dw/fltkviewbase.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'dw/fltkviewbase.cc') diff --git a/dw/fltkviewbase.cc b/dw/fltkviewbase.cc index 9e23cf19..066d3354 100644 --- a/dw/fltkviewbase.cc +++ b/dw/fltkviewbase.cc @@ -182,6 +182,9 @@ void FltkViewBase::draw (const core::Rectangle *rect, fl_rectf (X, Y, W, H); theLayout->expose (this, &r); } + // DEBUG: + //fl_color(FL_RED); + //fl_rect(X, Y, W, H); exposeArea = NULL; } @@ -274,6 +277,9 @@ int FltkViewBase::handle (int event) getDwButtonState ()); return Fl_Group::handle (event); + case FL_HIDE: + /* WORKAROUND: strangely, the tooltip window is not automatically hidden + * with its parent. Here we fake a LEAVE to achieve it. */ case FL_LEAVE: theLayout->leaveNotify (this, getDwButtonState ()); return Fl_Group::handle (event); -- cgit v1.2.3