Skip to content

Commit

Permalink
macOS: Call superclass constrainFrameRect for NSWindow to ensure that…
Browse files Browse the repository at this point in the history
… native title bar stays on screen
  • Loading branch information
ed95 committed Jul 10, 2020
1 parent c8a416f commit a5d26db
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2055,7 +2055,12 @@ static BOOL windowShouldClose (id self, SEL, id /*window*/)
static NSRect constrainFrameRect (id self, SEL, NSRect frameRect, NSScreen* screen)
{
if (auto* owner = getOwner (self))
{
frameRect = sendSuperclassMessage<NSRect, NSRect, NSScreen*> (self, @selector (constrainFrameRect:toScreen:),
frameRect, screen);

frameRect = owner->constrainRect (frameRect);
}

return frameRect;
}
Expand Down

0 comments on commit a5d26db

Please sign in to comment.