summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXWindowEvent.c
diff options
context:
space:
mode:
authorculler <culler>2018-11-24 17:34:47 (GMT)
committerculler <culler>2018-11-24 17:34:47 (GMT)
commit2db4c62686d9cffcc479f4bc70652fad961eb244 (patch)
tree371475dd369d66c704160bc447025d1ca7ffaeec /macosx/tkMacOSXWindowEvent.c
parent6a5cd5ed2cdcb924125f10bd9229aa00d24a2694 (diff)
downloadtk-2db4c62686d9cffcc479f4bc70652fad961eb244.zip
tk-2db4c62686d9cffcc479f4bc70652fad961eb244.tar.gz
tk-2db4c62686d9cffcc479f4bc70652fad961eb244.tar.bz2
Implement window:willUseFullScreenContentSize so fullscreen windows will really use the full screen.
Diffstat (limited to 'macosx/tkMacOSXWindowEvent.c')
-rw-r--r--macosx/tkMacOSXWindowEvent.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c
index fa4a8ce..9503447 100644
--- a/macosx/tkMacOSXWindowEvent.c
+++ b/macosx/tkMacOSXWindowEvent.c
@@ -136,6 +136,20 @@ extern NSString *NSWindowDidOrderOffScreenNotification;
}
}
+- (NSSize)window:(NSWindow *)window
+ willUseFullScreenContentSize:(NSSize)proposedSize
+{
+
+ /*
+ * We don't need to change the proposed size, but we do need to
+ * implement this method. Otherwise the full screen window will
+ * be sized to the screen's visibleFrame, leaving black bands at
+ * the top and bottom.
+ */
+
+ return proposedSize;
+}
+
- (void) windowEnteredFullScreen: (NSNotification *) notification
{
#ifdef TK_MAC_DEBUG_NOTIFICATIONS
@@ -261,14 +275,19 @@ extern NSString *NSWindowDidOrderOffScreenNotification;
#define observe(n, s) \
[nc addObserver:self selector:@selector(s) name:(n) object:nil]
+
observe(NSWindowDidBecomeKeyNotification, windowActivation:);
observe(NSWindowDidResignKeyNotification, windowActivation:);
observe(NSWindowDidMoveNotification, windowBoundsChanged:);
observe(NSWindowDidResizeNotification, windowBoundsChanged:);
observe(NSWindowDidDeminiaturizeNotification, windowExpanded:);
observe(NSWindowDidMiniaturizeNotification, windowCollapsed:);
+
+#if !(MAC_OS_X_VERSION_MAX_ALLOWED < 1070)
observe(NSWindowDidEnterFullScreenNotification, windowEnteredFullScreen:);
observe(NSWindowDidExitFullScreenNotification, windowExitedFullScreen:);
+#endif
+
#ifdef TK_MAC_DEBUG_NOTIFICATIONS
observe(NSWindowWillMoveNotification, windowDragStart:);
observe(NSWindowWillStartLiveResizeNotification, windowLiveResize:);