summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXWindowEvent.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-08 09:34:49 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-08 09:34:49 (GMT)
commitad423a347178d6279b112f7031e683c7e15d798a (patch)
tree36f06db6979a5b7758c167c042fb354ec68574f7 /macosx/tkMacOSXWindowEvent.c
parentfc651766ea872a53b38f2a219efb8ad57faa4d7e (diff)
parent4eefa7b3a6b659a083c0697a4ded7779823b495c (diff)
downloadtk-ad423a347178d6279b112f7031e683c7e15d798a.zip
tk-ad423a347178d6279b112f7031e683c7e15d798a.tar.gz
tk-ad423a347178d6279b112f7031e683c7e15d798a.tar.bz2
Merge trunk
Diffstat (limited to 'macosx/tkMacOSXWindowEvent.c')
-rw-r--r--macosx/tkMacOSXWindowEvent.c33
1 files changed, 8 insertions, 25 deletions
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c
index ba2134d..b234e72 100644
--- a/macosx/tkMacOSXWindowEvent.c
+++ b/macosx/tkMacOSXWindowEvent.c
@@ -155,19 +155,7 @@ extern NSString *NSWindowDidOrderOffScreenNotification;
#ifdef TK_MAC_DEBUG_NOTIFICATIONS
TKLog(@"-[%@(%p) %s] %@", [self class], self, _cmd, notification);
#endif
- NSWindow *w = [notification object];
- TkWindow *winPtr = TkMacOSXGetTkWindow(w);
- MacDrawable *macWin = winPtr->privatePtr;
-
- /*
- * We must apply the current window attributes when the window becomes a
- * FullScreen or a split screen window. Otherwise the mouse cursor will be
- * offset by the title bar height. The notification is sent in both cases.
- */
-
- if (winPtr) {
- TkMacOSXApplyWindowAttributes(macWin->winPtr, w);
- }
+ [(TKWindow *)[notification object] tkLayoutChanged];
}
- (void) windowExitedFullScreen: (NSNotification *) notification
@@ -175,18 +163,7 @@ extern NSString *NSWindowDidOrderOffScreenNotification;
#ifdef TK_MAC_DEBUG_NOTIFICATIONS
TKLog(@"-[%@(%p) %s] %@", [self class], self, _cmd, notification);
#endif
- NSWindow *w = [notification object];
- TkWindow *winPtr = TkMacOSXGetTkWindow(w);
- MacDrawable *macWin = winPtr->privatePtr;
-
- /*
- * Also apply the current window attributes when the window returns to its
- * normal size, for the same reason.
- */
-
- if (winPtr) {
- TkMacOSXApplyWindowAttributes(macWin->winPtr, w);
- }
+ [(TKWindow *)[notification object] tkLayoutChanged];
}
- (void) windowCollapsed: (NSNotification *) notification
@@ -936,6 +913,12 @@ ConfigureRestrictProc(
NSWindow *w = [self window];
TkWindow *winPtr = TkMacOSXGetTkWindow(w);
Tk_Window tkwin = (Tk_Window) winPtr;
+
+ if (![self inLiveResize] &&
+ [w respondsToSelector: @selector (tkLayoutChanged)]) {
+ [(TKWindow *)w tkLayoutChanged];
+ }
+
if (winPtr) {
unsigned int width = (unsigned int)newsize.width;
unsigned int height=(unsigned int)newsize.height;