Fix "Mac: Stubborn tooltips when menu window is open" (#1408)
Build and Test / build-linux (push) Has been cancelled
Build and Test / build-wayland (push) Has been cancelled
Build and Test / build-macos (push) Has been cancelled
Build and Test / build-windows (push) Has been cancelled

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.
This commit is contained in:
ManoloFLTK
2026-04-14 12:17:13 +02:00
parent 34c7120330
commit 2b3cb9be65
3 changed files with 1 additions and 7 deletions
-2
View File
@@ -162,8 +162,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
@@ -205,10 +205,7 @@ void Fl_Tooltip::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,