Fix "Mac: Stubborn tooltips when menu window is open" (#1408)

The fix extends to all platforms the check that doesn't post a tooltip
window if a menu window is active. Therefore, virtual member function
Fl_System_Driver::use_tooltip_timeout_condition() is no longer necessary.

Backported from master: 2b3cb9be65.
This commit is contained in:
ManoloFLTK
2026-04-14 12:17:13 +02:00
committed by Albrecht Schlosser
parent 01176c2137
commit 49bc0a4fb1
3 changed files with 1 additions and 7 deletions
-2
View File
@@ -149,8 +149,6 @@ public:
virtual const char *filename_name(const char *buf) {return buf;}
// implement to support fl_open_uri()
virtual int open_uri(const char * /*uri*/, char * /*msg*/, int /*msglen*/) {return 0;}
// the default implementation of use_tooltip_timeout_condition() may be enough
virtual int use_tooltip_timeout_condition() {return 0;}
// the default implementation of use_recent_tooltip_fix() may be enough
virtual int use_recent_tooltip_fix() {return 0;}
// the default implementation of need_test_shortcut_extra() may be enough
+1 -4
View File
@@ -166,10 +166,7 @@ static void tooltip_timeout(void*) {
if (window) window->hide();
Fl::remove_timeout(tooltip_hide_timeout);
} else {
int condition = 1;
// bugfix: no need to refactor
if (Fl::system_driver()->use_tooltip_timeout_condition()) condition = (Fl::grab() == NULL);
if ( condition ) {
if ( Fl::grab() == NULL ) {
if (!window) window = new Fl_TooltipBox;
// this cast bypasses the normal Fl_Window label() code:
((Fl_Widget *) window)->label(tip);
-1
View File
@@ -30,7 +30,6 @@ public:
int (*sort)(struct dirent **, struct dirent **),
char *errmsg=NULL, int errmsg_sz=0) FL_OVERRIDE;
int open_uri(const char *uri, char *msg, int msglen) FL_OVERRIDE;
int use_tooltip_timeout_condition() FL_OVERRIDE {return 1;}
int file_browser_load_filesystem(Fl_File_Browser *browser, char *filename, int lname, Fl_File_Icon *icon) FL_OVERRIDE;
void newUUID(char *uuidBuffer) FL_OVERRIDE;
char *preference_rootnode(Fl_Preferences *prefs, Fl_Preferences::Root root, const char *vendor,