Author: manolo Date: 2011-01-28 09:38:07 -0800 (Fri, 28 Jan 2011) New Revision: 8325 Log: Fix STR #2541. The code is unchanged for Mac OS and MSWindows because the bug does not occur there.
Modified: branches/branch-1.3/src/Fl_Tooltip.cxx Modified: branches/branch-1.3/src/Fl_Tooltip.cxx =================================================================== --- branches/branch-1.3/src/Fl_Tooltip.cxx 2011-01-28 16:11:45 UTC (rev 8324) +++ branches/branch-1.3/src/Fl_Tooltip.cxx 2011-01-28 17:38:07 UTC (rev 8325) @@ -132,15 +132,20 @@ if (!tip || !*tip) { if (window) window->hide(); } else { - //if (Fl::grab()) return; - if (!window) window = new Fl_TooltipBox; - // this cast bypasses the normal Fl_Window label() code: - ((Fl_Widget*)window)->label(tip); - window->layout(); - window->redraw(); -// printf("tooltip_timeout: Showing window %p with tooltip \"%s\"...\n", -// window, tip ? tip : "(null)"); - window->show(); + int condition = 1; +#if !(defined(__APPLE__) || defined(WIN32)) + condition = (Fl::grab() == NULL); +#endif + if ( condition ) { + if (!window) window = new Fl_TooltipBox; + // this cast bypasses the normal Fl_Window label() code: + ((Fl_Widget*)window)->label(tip); + window->layout(); + window->redraw(); + // printf("tooltip_timeout: Showing window %p with tooltip \"%s\"...\n", + // window, tip ? tip : "(null)"); + window->show(); + } } Fl::remove_timeout(recent_timeout); _______________________________________________ fltk-commit mailing list fltk-commit@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-commit