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
This commit is contained in:
parent
35c7c2f14c
commit
5e50478380
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user