summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2011-01-28 17:38:07 +0000
committerManolo Gouy <Manolo>2011-01-28 17:38:07 +0000
commit5e504783801063d39151d65cd122049311e802a9 (patch)
tree4f099bb27c45bc2d2e443f442e835cfada94c2b7
parent35c7c2f14cfbeec7d7e995859c7561b2696751ea (diff)
Fix STR #2541. The code is unchanged for Mac OS and MSWindows because the bug
does not occur there. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8325 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--src/Fl_Tooltip.cxx23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/Fl_Tooltip.cxx b/src/Fl_Tooltip.cxx
index 67d620f94..f91d9dcbc 100644
--- a/src/Fl_Tooltip.cxx
+++ b/src/Fl_Tooltip.cxx
@@ -132,15 +132,20 @@ static void tooltip_timeout(void*) {
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);