diff options
| author | Bill Spitzak <spitzak@gmail.com> | 2002-05-14 15:24:03 +0000 |
|---|---|---|
| committer | Bill Spitzak <spitzak@gmail.com> | 2002-05-14 15:24:03 +0000 |
| commit | 76b185b33e89ab3db5c404f32dd62879ab17a8c4 (patch) | |
| tree | 0d6bc08436f65945d6e558e5784d4823d1292cf3 /src/Fl_Tooltip.cxx | |
| parent | 7a455a05c64d74ebf5509c79f40715dbdcdc8a29 (diff) | |
Clicking on tooltips makes them go away and they don't reappear.
Tooltips do not appear when widgets are entered for reasons other
than the mouse moving (ie like when an overlaying window disappears)
Possible fix for WIN32 titlebar color when tooltip is instantly
displayed for a new widget (untested).
Recursion problem in DnD fixed (caused a drag inside the same program
to paste many times into where you dropped). Tested only on X but
this bug may be X-only.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2220 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Tooltip.cxx')
| -rw-r--r-- | src/Fl_Tooltip.cxx | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/Fl_Tooltip.cxx b/src/Fl_Tooltip.cxx index 2597d050e..f0ed3a17b 100644 --- a/src/Fl_Tooltip.cxx +++ b/src/Fl_Tooltip.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Tooltip.cxx,v 1.38.2.20 2002/05/13 17:23:10 easysw Exp $" +// "$Id: Fl_Tooltip.cxx,v 1.38.2.21 2002/05/14 15:24:03 spitzak Exp $" // // Tooltip source file for the Fast Light Tool Kit (FLTK). // @@ -133,7 +133,6 @@ static void tt_enter(Fl_Widget* widget) { // printf("tt_enter(widget=%p)\n", widget); // printf(" window=%p\n", window); - // find the enclosing group with a tooltip: Fl_Widget* w = widget; while (w && !w->tooltip()) { @@ -164,6 +163,11 @@ Fl_Tooltip::enter_area(Fl_Widget* wid, int x,int y,int w,int h, const char* t) widget = wid; X = x; Y = y; W = w; H = h; tip = t; if (recent_tooltip || Fl_Tooltip::delay() < .1) { // switch directly from a previous tooltip to the new one: +#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->hide(); +#endif tooltip_timeout(0); } else { if (window) window->hide(); @@ -173,7 +177,12 @@ Fl_Tooltip::enter_area(Fl_Widget* wid, int x,int y,int w,int h, const char* t) tip = 0; widget = 0; if (window) window->hide(); - if (recent_tooltip) Fl::add_timeout(.2, recent_timeout); + if (recent_tooltip) { + if (Fl::event_state() & 0x7f00000 /*FL_BUTTONS*/) + recent_tooltip = 0; + else + Fl::add_timeout(.2, recent_timeout); + } } // printf(" tip=\"%s\", window->shown()=%d\n", tip ? tip : "(null)", @@ -191,5 +200,5 @@ void Fl_Widget::tooltip(const char *tt) { } // -// End of "$Id: Fl_Tooltip.cxx,v 1.38.2.20 2002/05/13 17:23:10 easysw Exp $". +// End of "$Id: Fl_Tooltip.cxx,v 1.38.2.21 2002/05/14 15:24:03 spitzak Exp $". // |
