summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>2002-05-14 15:55:20 +0000
committerBill Spitzak <spitzak@gmail.com>2002-05-14 15:55:20 +0000
commitd07b6f0ecb10d4aa29ac966dd4876d739fc11df3 (patch)
treee49fe6c1cf2a76b2d38d587ac4a721b20666a488 /src
parent76b185b33e89ab3db5c404f32dd62879ab17a8c4 (diff)
Another change to tooltips noticed when making the 2.0 version.
It appears that Fl::remove_timeout() may be broken in 1.1. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2221 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Tooltip.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Fl_Tooltip.cxx b/src/Fl_Tooltip.cxx
index f0ed3a17b..7586a238c 100644
--- a/src/Fl_Tooltip.cxx
+++ b/src/Fl_Tooltip.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Tooltip.cxx,v 1.38.2.21 2002/05/14 15:24:03 spitzak Exp $"
+// "$Id: Fl_Tooltip.cxx,v 1.38.2.22 2002/05/14 15:55:20 spitzak Exp $"
//
// Tooltip source file for the Fast Light Tool Kit (FLTK).
//
@@ -154,11 +154,11 @@ Fl_Tooltip::enter_area(Fl_Widget* wid, int x,int y,int w,int h, const char* t)
// printf(" recursion=%d, window=%p\n", recursion, window);
if (recursion) return;
- Fl::remove_timeout(tooltip_timeout);
- Fl::remove_timeout(recent_timeout);
if (t && *t && enabled()) { // there is a tooltip
// do nothing if it is the same:
if (wid==widget && x==X && y==Y && w==W && h==H && t==tip) return;
+ Fl::remove_timeout(tooltip_timeout);
+ Fl::remove_timeout(recent_timeout);
// remember it:
widget = wid; X = x; Y = y; W = w; H = h; tip = t;
if (recent_tooltip || Fl_Tooltip::delay() < .1) {
@@ -174,6 +174,9 @@ Fl_Tooltip::enter_area(Fl_Widget* wid, int x,int y,int w,int h, const char* t)
Fl::add_timeout(Fl_Tooltip::delay(), tooltip_timeout);
}
} else { // no tooltip
+ if (!tip) return;
+ Fl::remove_timeout(tooltip_timeout);
+ Fl::remove_timeout(recent_timeout);
tip = 0;
widget = 0;
if (window) window->hide();
@@ -200,5 +203,5 @@ void Fl_Widget::tooltip(const char *tt) {
}
//
-// End of "$Id: Fl_Tooltip.cxx,v 1.38.2.21 2002/05/14 15:24:03 spitzak Exp $".
+// End of "$Id: Fl_Tooltip.cxx,v 1.38.2.22 2002/05/14 15:55:20 spitzak Exp $".
//