Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

use -[NSScreen visibleFrame] (thanks @galaxas0!)

  • Loading branch information...
commit 5c1cad198d7f60210be4d6f6852fa1f3c32df1ff 1 parent 9c156fa
@joshaber joshaber authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/UIKit/TUIPopover.m
View
4 lib/UIKit/TUIPopover.m
@@ -173,7 +173,7 @@ - (void)showRelativeToRect:(CGRect)positioningRect ofView:(TUIView *)positioning
BOOL (^checkPopoverSizeForScreenWithPopoverEdge)(CGRectEdge) = ^ (CGRectEdge popoverEdge)
{
CGRect popoverRect = popoverRectForEdge(popoverEdge);
- return NSContainsRect(positioningView.nsWindow.screen.frame, popoverRect);
+ return NSContainsRect(positioningView.nsWindow.screen.visibleFrame, popoverRect);
};
//This is as ugly as sin… but it gets the job done. I couldn't think of a nice way to code this but still get the desired behaviour
@@ -196,7 +196,7 @@ - (void)showRelativeToRect:(CGRect)positioningRect ofView:(TUIView *)positioning
};
CGRect (^fitRectToScreen)(CGRect) = ^ (CGRect proposedRect) {
- NSRect screenRect = positioningView.nsWindow.screen.frame;
+ NSRect screenRect = positioningView.nsWindow.screen.visibleFrame;
if (proposedRect.origin.y < NSMinY(screenRect))
proposedRect.origin.y = NSMinY(screenRect);
Please sign in to comment.
Something went wrong with that request. Please try again.