@@ -163,7 +163,7 @@ - (void)scheduleClose;
163163- (void )handleBrowseForFile : (NSDictionary *)attr ;
164164- (void )handleShowDialog : (NSDictionary *)attr ;
165165- (void )handleDeleteSign : (NSDictionary *)attr ;
166- - (void )setToolTipDelay : ( NSTimeInterval ) seconds ;
166+ - (void )setToolTipDelay ;
167167@end
168168
169169
@@ -221,6 +221,8 @@ - (id)initWithBackend:(id)backend pid:(int)processIdentifier
221221
222222 [mainMenu addItem: appMenuItem];
223223
224+ [self setToolTipDelay ];
225+
224226 isInitialized = YES ;
225227
226228 // After MMVimController's initialization is completed,
@@ -1007,11 +1009,6 @@ - (void)handleMessage:(int)msgid data:(NSData *)data
10071009 [textView setToolTipAtMousePoint: toolTip];
10081010 else
10091011 [textView setToolTipAtMousePoint: nil ];
1010- } else if (SetTooltipDelayMsgID == msgid) {
1011- NSDictionary *dict = [NSDictionary dictionaryWithData: data];
1012- NSNumber *delay = dict ? [dict objectForKey: @" delay" ] : nil ;
1013- if (delay)
1014- [self setToolTipDelay: [delay floatValue ]];
10151012 } else if (AddToMRUMsgID == msgid) {
10161013 NSDictionary *dict = [NSDictionary dictionaryWithData: data];
10171014 NSArray *filenames = dict ? [dict objectForKey: @" filenames" ] : nil ;
@@ -1907,18 +1904,15 @@ - (void)handleDeleteSign:(NSDictionary *)attr
19071904 [view deleteSign: [attr objectForKey: @" imgName" ]];
19081905}
19091906
1910- - (void )setToolTipDelay : ( NSTimeInterval ) seconds
1907+ - (void )setToolTipDelay
19111908{
19121909 // HACK! NSToolTipManager is an AppKit private class.
19131910 static Class TTM = nil ;
19141911 if (!TTM)
19151912 TTM = NSClassFromString (@" NSToolTipManager" );
19161913
1917- if (seconds < 0 )
1918- seconds = 0 ;
1919-
19201914 if (TTM) {
1921- [[TTM sharedToolTipManager ] setInitialToolTipDelay: seconds ];
1915+ [[TTM sharedToolTipManager ] setInitialToolTipDelay: 1e-6 ];
19221916 } else {
19231917 ASLogNotice (@" Failed to get NSToolTipManager" );
19241918 }
0 commit comments