From 0472b9ea603003d59fd885d499ff176ca0bf7890 Mon Sep 17 00:00:00 2001 From: Koen Schmeets Date: Wed, 27 Nov 2019 13:51:27 +0100 Subject: [PATCH] macOS: fix tooltips not closing on Catalina. --- src/platform/guimac.mm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/platform/guimac.mm b/src/platform/guimac.mm index a5763c90..cb939cf7 100644 --- a/src/platform/guimac.mm +++ b/src/platform/guimac.mm @@ -16,6 +16,7 @@ using namespace SolveSpace; + (NSToolTipManager *)sharedToolTipManager; - (void)setInitialToolTipDelay:(double)delay; - (void)orderOutToolTip; +- (void)abortToolTip; - (void)_displayTemporaryToolTipForView:(id)arg1 withString:(id)arg2; @end @@ -909,7 +910,11 @@ public: NSToolTipManager *nsToolTipManager = [NSToolTipManager sharedToolTipManager]; if(newText.empty()) { - [nsToolTipManager orderOutToolTip]; + if ([nsToolTipManager respondsToSelector:@selector(abortToolTip)]) { + [nsToolTipManager abortToolTip]; + } else { + [nsToolTipManager orderOutToolTip]; + } } else { [nsToolTipManager _displayTemporaryToolTipForView:ssView withString:Wrap(newText)]; }