More fixes for tooltips blinking.

Tooltips do not appear unless you move the mouse across the border of
a widget (previous version would pop up the tooltip after the timeout
after any movement).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2224 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Bill Spitzak
2002-05-15 16:37:06 +00:00
parent 6f84fa1caa
commit 786e3ed0a8
2 changed files with 11 additions and 9 deletions
+8 -6
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl.cxx,v 1.24.2.41.2.29 2002/05/14 15:24:02 spitzak Exp $"
// "$Id: Fl.cxx,v 1.24.2.41.2.30 2002/05/15 16:37:06 spitzak Exp $"
//
// Main event handling code for the Fast Light Tool Kit (FLTK).
//
@@ -585,11 +585,14 @@ int Fl::handle(int event, Fl_Window* window)
if (pushed()) {
w = pushed();
e_number = event = FL_DRAG;
} else if (modal() && w != modal()) {
w = 0;
break;
}
if (modal() && w != modal()) w = 0;
if (grab()) w = grab();
break;
{Fl_Widget* pbm = belowmouse();
int ret = (w && send(event, w, window));
if (pbm != belowmouse()) Fl_Tooltip::enter(belowmouse());
return ret;}
case FL_RELEASE: {
if (pushed()) {
@@ -667,7 +670,6 @@ int Fl::handle(int event, Fl_Window* window)
}
if (w && send(event, w, window)) {
dnd_flag = 0;
if (event == FL_MOVE) Fl_Tooltip::enter(belowmouse());
return 1;
}
dnd_flag = 0;
@@ -897,5 +899,5 @@ void Fl_Window::flush() {
}
//
// End of "$Id: Fl.cxx,v 1.24.2.41.2.29 2002/05/14 15:24:02 spitzak Exp $".
// End of "$Id: Fl.cxx,v 1.24.2.41.2.30 2002/05/15 16:37:06 spitzak Exp $".
//
+3 -3
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Tooltip.cxx,v 1.38.2.22 2002/05/14 15:55:20 spitzak Exp $"
// "$Id: Fl_Tooltip.cxx,v 1.38.2.23 2002/05/15 16:37:06 spitzak Exp $"
//
// Tooltip source file for the Fast Light Tool Kit (FLTK).
//
@@ -136,7 +136,7 @@ tt_enter(Fl_Widget* widget) {
// find the enclosing group with a tooltip:
Fl_Widget* w = widget;
while (w && !w->tooltip()) {
if (w == window) return; // don't do anything if pointed at tooltip
//if (w == window) return; // don't do anything if pointed at tooltip
w = w->parent();
}
if (!w) {
@@ -203,5 +203,5 @@ void Fl_Widget::tooltip(const char *tt) {
}
//
// End of "$Id: Fl_Tooltip.cxx,v 1.38.2.22 2002/05/14 15:55:20 spitzak Exp $".
// End of "$Id: Fl_Tooltip.cxx,v 1.38.2.23 2002/05/15 16:37:06 spitzak Exp $".
//