From 786e3ed0a879d3f32cdf43e68043aa38d959885f Mon Sep 17 00:00:00 2001 From: Bill Spitzak Date: Wed, 15 May 2002 16:37:06 +0000 Subject: 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 --- src/Fl.cxx | 14 ++++++++------ src/Fl_Tooltip.cxx | 6 +++--- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/Fl.cxx b/src/Fl.cxx index 949107ee7..e2d34b307 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -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 $". // diff --git a/src/Fl_Tooltip.cxx b/src/Fl_Tooltip.cxx index 7586a238c..b2d9e5403 100644 --- a/src/Fl_Tooltip.cxx +++ b/src/Fl_Tooltip.cxx @@ -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 $". // -- cgit v1.2.3