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 36e1761c84
commit cf1e2b9042
2 changed files with 16 additions and 0 deletions

View File

@ -840,4 +840,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;
}