Convince OS X to fully fullscreen windows

We typically want to have the full screen given to
the content, not the aspect-ratio preserving behavior
that newer OS X has.

https://bugzilla.gnome.org/show_bug.cgi?id=779383
This commit is contained in:
Matthias Clasen 2017-02-28 18:44:33 -05:00
parent 35830fd88d
commit 015ff46633
2 changed files with 16 additions and 0 deletions

View File

@ -838,4 +838,19 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
inMaximizeTransition = NO;
}
-(NSSize)window:(NSWindow *)window willUseFullScreenContentSize:(NSSize)proposedSize
{
return [[window screen] frame].size;
}
-(void)windowWillEnterFullScreen:(NSNotification *)aNotification
{
lastUnfullscreenFrame = [self frame];
}
-(void)windowWillExitFullScreen:(NSNotification *)aNotification
{
[self setFrame:lastUnfullscreenFrame display:YES]
}
@end

View File

@ -37,6 +37,7 @@
NSRect lastUnmaximizedFrame;
NSRect lastMaximizedFrame;
NSRect lastUnfullscreenFrame;
BOOL inMaximizeTransition;
}