We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1f5e95 commit 16f614aCopy full SHA for 16f614a
Source/CUI/source/CommandPopover.mm
@@ -1045,11 +1045,12 @@ - (void)showRelativeToRect:(NSRect)_positioning_rect
1045
}();
1046
const double y = NSMinY(rect_on_screen) - m_ContentSize.height;
1047
NSScreen *screen = _positioning_view.window.screen;
1048
+ const NSRect screen_rect = screen.visibleFrame;
1049
const double x = [&] {
- if( initial_x < 0. )
1050
- return 0.;
1051
- else if( initial_x + sx > screen.frame.size.width )
1052
- return screen.frame.size.width - sx;
+ if( initial_x < screen_rect.origin.x )
+ return screen_rect.origin.x;
+ else if( initial_x + sx > NSMaxX(screen_rect) )
1053
+ return NSMaxX(screen_rect) - sx;
1054
else
1055
return initial_x;
1056
0 commit comments