Skip to content

Commit

Permalink
fix slideshow window placement in macOS 12 (Monterey)
Browse files Browse the repository at this point in the history
  • Loading branch information
gobbledegook committed Nov 21, 2021
1 parent f7a5d1a commit fdfa8e9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions SlideshowWindow.m
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,11 @@ - (void)resignMainWindow {
[super resignMainWindow];
}

- (void)setFrame:(NSRect)frameRect display:(BOOL)flag
- (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen
{
// As of 10.15.1(?) when the menubar hides, the window will get moved up by the height of the menubar.
// This workaround prevents that.
frameRect.origin = screenRect.origin;
[super setFrame:frameRect display:flag];
// This should be the correct fix for that.
return [super constrainFrameRect:[[self screen] frame] toScreen:screen];
}

#pragma mark timer stuff
Expand Down

0 comments on commit fdfa8e9

Please sign in to comment.