diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2011-07-08 22:07:59 -0400 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2011-07-08 22:07:59 -0400 |
commit | e5f0de4d3d9d272a73bc829cd25af2054244676e (patch) | |
tree | df3203c9e4c6d673c102ec86e5df7f9527ccfda0 /dw/fltkplatform.cc | |
parent | a87058e4e0652252a7161d8c5736370fa2ea68a8 (diff) |
Cancel the tooltip window when a popup menu is shown
Diffstat (limited to 'dw/fltkplatform.cc')
-rw-r--r-- | dw/fltkplatform.cc | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/dw/fltkplatform.cc b/dw/fltkplatform.cc index 02a64636..b22880b0 100644 --- a/dw/fltkplatform.cc +++ b/dw/fltkplatform.cc @@ -272,7 +272,7 @@ FltkTooltip::~FltkTooltip () if (escaped_str) free(escaped_str); if (in_tooltip || req_tooltip) - onLeave(); /* cancel tooltip window */ + cancel(); /* cancel tooltip window */ } FltkTooltip *FltkTooltip::create (const char *text) @@ -334,11 +334,24 @@ void FltkTooltip::onEnter() } /* - * Remove a shown tooltip or cancel a pending one + * Leaving the widget cancels the tooltip */ void FltkTooltip::onLeave() { _MSG(" FltkTooltip::onLeave in_tooltip=%d\n", in_tooltip); + cancel(); +} + +void FltkPlatform::cancelTooltip() +{ + FltkTooltip::cancel(); +} + +/* + * Remove a shown tooltip or cancel a pending one + */ +void FltkTooltip::cancel() +{ if (req_tooltip) { Fl::remove_timeout(tooltip_tcb); req_tooltip = 0; |