diff options
| author | Manolo Gouy <Manolo> | 2016-04-09 15:37:40 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-04-09 15:37:40 +0000 |
| commit | 3bc5be71a39bf2ed9d9937a4f60df61dd6d3a2b4 (patch) | |
| tree | 9a870734e9c2c067bab7f6eadd53ce08ccded0d5 /src/Fl_Tooltip.cxx | |
| parent | fe624b83fc6a817098a5ee49e6ceb329b71548d5 (diff) | |
Rewrite Fl_Tooltip.cxx for the driver model.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11565 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Tooltip.cxx')
| -rw-r--r-- | src/Fl_Tooltip.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/Fl_Tooltip.cxx b/src/Fl_Tooltip.cxx index 26a2496eb..2d88182fe 100644 --- a/src/Fl_Tooltip.cxx +++ b/src/Fl_Tooltip.cxx @@ -19,6 +19,8 @@ #include <FL/Fl_Tooltip.H> #include <FL/fl_draw.H> #include <FL/Fl_Menu_Window.H> +#include <FL/Fl.H> +#include <FL/Fl_System_Driver.H> #include <stdio.h> #include <string.h> // strdup() @@ -151,9 +153,8 @@ static void tooltip_timeout(void*) { if (window) window->hide(); } else { int condition = 1; -#if !(defined(__APPLE__) || defined(WIN32)) // bugfix: no need to refactor - condition = (Fl::grab() == NULL); -#endif +// bugfix: no need to refactor + if (Fl::system_driver()->use_tooltip_timeout_condition()) condition = (Fl::grab() == NULL); if ( condition ) { if (!window) window = new Fl_TooltipBox; // this cast bypasses the normal Fl_Window label() code: @@ -287,12 +288,9 @@ void Fl_Tooltip::enter_area(Fl_Widget* wid, int x,int y,int w,int h, const char* if (recent_tooltip) { if (window) window->hide(); Fl::add_timeout(Fl_Tooltip::hoverdelay(), tooltip_timeout); - } else if (Fl_Tooltip::delay() < .1) { -#ifdef WIN32 // possible fix for the Windows titlebar, it seems to want the // window to be destroyed, moving it messes up the parenting: - if (window && window->visible()) window->hide(); -#endif // WIN32 + if (Fl::system_driver()->use_recent_tooltip_fix() && window && window->visible()) window->hide(); tooltip_timeout(0); } else { if (window && window->visible()) window->hide(); |
