[gtk+] Convince OS X to fully fullscreen windows
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Convince OS X to fully fullscreen windows
- Date: Thu, 2 Mar 2017 13:11:38 +0000 (UTC)
commit 015ff46633afe0d9f1050f769bd43a7bff9ccdd9
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Feb 28 18:44:33 2017 -0500
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
gdk/quartz/GdkQuartzNSWindow.c | 15 +++++++++++++++
gdk/quartz/GdkQuartzNSWindow.h | 1 +
2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/gdk/quartz/GdkQuartzNSWindow.c b/gdk/quartz/GdkQuartzNSWindow.c
index cafabf4..d85056b 100644
--- a/gdk/quartz/GdkQuartzNSWindow.c
+++ b/gdk/quartz/GdkQuartzNSWindow.c
@@ -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
diff --git a/gdk/quartz/GdkQuartzNSWindow.h b/gdk/quartz/GdkQuartzNSWindow.h
index 31175da..b8edf43 100644
--- a/gdk/quartz/GdkQuartzNSWindow.h
+++ b/gdk/quartz/GdkQuartzNSWindow.h
@@ -37,6 +37,7 @@
NSRect lastUnmaximizedFrame;
NSRect lastMaximizedFrame;
+ NSRect lastUnfullscreenFrame;
BOOL inMaximizeTransition;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]