aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTooltip.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-08-14 18:47:46 +0000
committerBibiko <bibiko@eva.mpg.de>2009-08-14 18:47:46 +0000
commit688757b751d6ebe8a0e33ab0e431bc711a69eca5 (patch)
tree44a98f41cf793af029cb3f27fd9bdaf588419981 /Source/SPTooltip.m
parent8f2a7c3ba9db6481e36f69f66e542842aba9f02a (diff)
downloadsequelpro-688757b751d6ebe8a0e33ab0e431bc711a69eca5.tar.gz
sequelpro-688757b751d6ebe8a0e33ab0e431bc711a69eca5.tar.bz2
sequelpro-688757b751d6ebe8a0e33ab0e431bc711a69eca5.zip
• improved the closing behaviour of the SPTooltip
Diffstat (limited to 'Source/SPTooltip.m')
-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];