@@ -162,7 +162,7 @@ - (void)scheduleClose;
162162- (void )handleBrowseForFile : (NSDictionary *)attr ;
163163- (void )handleShowDialog : (NSDictionary *)attr ;
164164- (void )handleDeleteSign : (NSDictionary *)attr ;
165- - (void )setToolTipDelay : ( NSTimeInterval ) seconds ;
165+ - (void )setToolTipDelay ;
166166@end
167167
168168
@@ -220,6 +220,8 @@ - (id)initWithBackend:(id)backend pid:(int)processIdentifier
220220
221221 [mainMenu addItem: appMenuItem];
222222
223+ [self setToolTipDelay ];
224+
223225 isInitialized = YES ;
224226
225227 // After MMVimController's initialization is completed,
@@ -1006,11 +1008,6 @@ - (void)handleMessage:(int)msgid data:(NSData *)data
10061008 [textView setToolTipAtMousePoint: toolTip];
10071009 else
10081010 [textView setToolTipAtMousePoint: nil ];
1009- } else if (SetTooltipDelayMsgID == msgid) {
1010- NSDictionary *dict = [NSDictionary dictionaryWithData: data];
1011- NSNumber *delay = dict ? [dict objectForKey: @" delay" ] : nil ;
1012- if (delay)
1013- [self setToolTipDelay: [delay floatValue ]];
10141011 } else if (AddToMRUMsgID == msgid) {
10151012 NSDictionary *dict = [NSDictionary dictionaryWithData: data];
10161013 NSArray *filenames = dict ? [dict objectForKey: @" filenames" ] : nil ;
@@ -1893,18 +1890,15 @@ - (void)handleDeleteSign:(NSDictionary *)attr
18931890 [view deleteSign: [attr objectForKey: @" imgName" ]];
18941891}
18951892
1896- - (void )setToolTipDelay : ( NSTimeInterval ) seconds
1893+ - (void )setToolTipDelay
18971894{
18981895 // HACK! NSToolTipManager is an AppKit private class.
18991896 static Class TTM = nil ;
19001897 if (!TTM)
19011898 TTM = NSClassFromString (@" NSToolTipManager" );
19021899
1903- if (seconds < 0 )
1904- seconds = 0 ;
1905-
19061900 if (TTM) {
1907- [[TTM sharedToolTipManager ] setInitialToolTipDelay: seconds ];
1901+ [[TTM sharedToolTipManager ] setInitialToolTipDelay: 1e-6 ];
19081902 } else {
19091903 ASLogNotice (@" Failed to get NSToolTipManager" );
19101904 }
0 commit comments