diff options
author | Abhi Beckert <abhi@Twist-of-Lemon-2.local> | 2015-05-16 08:06:06 +1000 |
---|---|---|
committer | Abhi Beckert <abhi@Twist-of-Lemon-2.local> | 2015-05-16 08:06:06 +1000 |
commit | 57a6f6c73bdaa202164645370d37fcbe5d14a092 (patch) | |
tree | dd30aa6156064f1d4c0e10ea87059625470fc2f9 /Source/SPTooltip.m | |
parent | b5e972f4504043dfb9c358e272e93fb59ae2127f (diff) | |
parent | 0f0c43eb74408b6a65a42e2c6fd46f4142ef8e3f (diff) | |
download | sequelpro-57a6f6c73bdaa202164645370d37fcbe5d14a092.tar.gz sequelpro-57a6f6c73bdaa202164645370d37fcbe5d14a092.tar.bz2 sequelpro-57a6f6c73bdaa202164645370d37fcbe5d14a092.zip |
Merge remote-tracking branch 'sequelpro/master'
Diffstat (limited to 'Source/SPTooltip.m')
-rw-r--r-- | Source/SPTooltip.m | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Source/SPTooltip.m b/Source/SPTooltip.m index 276b5ebd..478945ed 100644 --- a/Source/SPTooltip.m +++ b/Source/SPTooltip.m @@ -96,7 +96,7 @@ static CGFloat slow_in_out (CGFloat t) + (void)showWithObject:(id)content atLocation:(NSPoint)point { - [self showWithObject:content atLocation:point ofType:@"text" displayOptions:[NSDictionary dictionary]]; + [self showWithObject:content atLocation:point ofType:@"text" displayOptions:@{}]; } + (void)showWithObject:(id)content atLocation:(NSPoint)point ofType:(NSString *)type @@ -241,9 +241,9 @@ static CGFloat slow_in_out (CGFloat t) - (void)dealloc { [NSObject cancelPreviousPerformRequestsWithTarget:self]; - [didOpenAtDate release]; - [webView release]; - [webPreferences release]; + SPClear(didOpenAtDate); + SPClear(webView); + SPClear(webPreferences); [super dealloc]; } @@ -320,8 +320,11 @@ static CGFloat slow_in_out (CGFloat t) NSScreen* candidate; for(candidate in [NSScreen screens]) { - if(NSMinX([candidate frame]) < pos.x && NSMinX([candidate frame]) > NSMinX(screenFrame)) - screenFrame = [candidate frame]; + NSRect cf = [candidate frame]; + if(NSPointInRect(pos,cf)) { + screenFrame = cf; + break; + } } // is contentView a webView calculate actual rendered size via JavaScript |