mirror of
https://github.com/fltk/fltk.git
synced 2026-05-28 11:25:22 +08:00
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.
This commit is contained in:
@@ -162,8 +162,6 @@ public:
|
|||||||
virtual const char *filename_name(const char *buf) {return buf;}
|
virtual const char *filename_name(const char *buf) {return buf;}
|
||||||
// implement to support fl_open_uri()
|
// implement to support fl_open_uri()
|
||||||
virtual int open_uri(const char * /*uri*/, char * /*msg*/, int /*msglen*/) {return 0;}
|
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
|
// the default implementation of use_recent_tooltip_fix() may be enough
|
||||||
virtual int use_recent_tooltip_fix() {return 0;}
|
virtual int use_recent_tooltip_fix() {return 0;}
|
||||||
// the default implementation of need_test_shortcut_extra() may be enough
|
// the default implementation of need_test_shortcut_extra() may be enough
|
||||||
|
|||||||
+1
-4
@@ -205,10 +205,7 @@ void Fl_Tooltip::tooltip_timeout_(void*) {
|
|||||||
if (window) window->hide();
|
if (window) window->hide();
|
||||||
Fl::remove_timeout(tooltip_hide_timeout);
|
Fl::remove_timeout(tooltip_hide_timeout);
|
||||||
} else {
|
} else {
|
||||||
int condition = 1;
|
if ( Fl::grab() == NULL ) {
|
||||||
// bugfix: no need to refactor
|
|
||||||
if (Fl::system_driver()->use_tooltip_timeout_condition()) condition = (Fl::grab() == NULL);
|
|
||||||
if ( condition ) {
|
|
||||||
if (!window) window = new Fl_TooltipBox;
|
if (!window) window = new Fl_TooltipBox;
|
||||||
// this cast bypasses the normal Fl_Window label() code:
|
// this cast bypasses the normal Fl_Window label() code:
|
||||||
((Fl_Widget *) window)->label(tip);
|
((Fl_Widget *) window)->label(tip);
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ public:
|
|||||||
int (*sort)(struct dirent **, struct dirent **),
|
int (*sort)(struct dirent **, struct dirent **),
|
||||||
char *errmsg=NULL, int errmsg_sz=0) FL_OVERRIDE;
|
char *errmsg=NULL, int errmsg_sz=0) FL_OVERRIDE;
|
||||||
int open_uri(const char *uri, char *msg, int msglen) 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;
|
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;
|
void newUUID(char *uuidBuffer) FL_OVERRIDE;
|
||||||
char *preference_rootnode(Fl_Preferences *prefs, Fl_Preferences::Root root, const char *vendor,
|
char *preference_rootnode(Fl_Preferences *prefs, Fl_Preferences::Root root, const char *vendor,
|
||||||
|
|||||||
Reference in New Issue
Block a user