@@ -161,7 +161,7 @@ - (void)scheduleClose;
161161- (void )handleBrowseForFile : (NSDictionary *)attr ;
162162- (void )handleShowDialog : (NSDictionary *)attr ;
163163- (void )handleDeleteSign : (NSDictionary *)attr ;
164- - (void )setToolTipDelay : ( NSTimeInterval ) seconds ;
164+ - (void )setToolTipDelay ;
165165@end
166166
167167
@@ -219,6 +219,8 @@ - (id)initWithBackend:(id)backend pid:(int)processIdentifier
219219
220220 [mainMenu addItem: appMenuItem];
221221
222+ [self setToolTipDelay ];
223+
222224 isInitialized = YES ;
223225
224226 // 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 ;
@@ -1906,18 +1903,15 @@ - (void)handleDeleteSign:(NSDictionary *)attr
19061903 [view deleteSign: [attr objectForKey: @" imgName" ]];
19071904}
19081905
1909- - (void )setToolTipDelay : ( NSTimeInterval ) seconds
1906+ - (void )setToolTipDelay
19101907{
19111908 // HACK! NSToolTipManager is an AppKit private class.
19121909 static Class TTM = nil ;
19131910 if (!TTM)
19141911 TTM = NSClassFromString (@" NSToolTipManager" );
19151912
1916- if (seconds < 0 )
1917- seconds = 0 ;
1918-
19191913 if (TTM) {
1920- [[TTM sharedToolTipManager ] setInitialToolTipDelay: seconds ];
1914+ [[TTM sharedToolTipManager ] setInitialToolTipDelay: 1e-6 ];
19211915 } else {
19221916 ASLogNotice (@" Failed to get NSToolTipManager" );
19231917 }
0 commit comments