aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/SPTooltip.m10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/SPTooltip.m b/Source/SPTooltip.m
index aa3e906f..315ea92c 100644
--- a/Source/SPTooltip.m
+++ b/Source/SPTooltip.m
@@ -336,18 +336,22 @@ static float slow_in_out (float t)
BOOL didAcceptMouseMovedEvents = [keyWindow acceptsMouseMovedEvents];
[keyWindow setAcceptsMouseMovedEvents:YES];
NSEvent* event;
+ int eventType;
while(event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantFuture] inMode:NSDefaultRunLoopMode dequeue:YES])
{
[NSApp sendEvent:event];
-
- if([event type] == NSLeftMouseDown || [event type] == NSRightMouseDown || [event type] == NSOtherMouseDown || [event type] == NSKeyDown || [event type] == NSScrollWheel)
+ eventType = [event type];
+ if(eventType == NSKeyDown || eventType == NSLeftMouseDown || eventType == NSRightMouseDown || eventType == NSOtherMouseDown || eventType == NSScrollWheel)
break;
- if([event type] == NSMouseMoved && [self shouldCloseForMousePosition:[NSEvent mouseLocation]])
+ if(eventType == NSMouseMoved && [self shouldCloseForMousePosition:[NSEvent mouseLocation]])
break;
if(keyWindow != [NSApp keyWindow] || ![NSApp isActive])
break;
+
+ if(spTooltipCounter > 1)
+ break;
}
[keyWindow setAcceptsMouseMovedEvents:didAcceptMouseMovedEvents];