diff options
author | culler <culler> | 2021-10-29 19:37:48 (GMT) |
---|---|---|
committer | culler <culler> | 2021-10-29 19:37:48 (GMT) |
commit | 9f8d0084fff43896df80b3c6eeca47c145bcd940 (patch) | |
tree | 0e2a90e321b2f8dae003f52d83027b254c643d74 /macosx | |
parent | 1b792f679cd4121f0ba1d7b919dc2b0d9b54b821 (diff) | |
download | tk-9f8d0084fff43896df80b3c6eeca47c145bcd940.zip tk-9f8d0084fff43896df80b3c6eeca47c145bcd940.tar.gz tk-9f8d0084fff43896df80b3c6eeca47c145bcd940.tar.bz2 |
Apply a patch from Christian Werner which prevents crashes when non-Tk windows go fullscreen.
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXWindowEvent.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c index 410c4b5..e8de467 100644 --- a/macosx/tkMacOSXWindowEvent.c +++ b/macosx/tkMacOSXWindowEvent.c @@ -162,6 +162,9 @@ extern NSString *NSWindowDidOrderOffScreenNotification; #ifdef TK_MAC_DEBUG_NOTIFICATIONS TKLog(@"-[%@(%p) %s] %@", [self class], self, _cmd, notification); #endif + if (![[notification object] respondsToSelector: @selector (tkLayoutChanged)]) { + return; + } [(TKWindow *)[notification object] tkLayoutChanged]; } @@ -170,6 +173,9 @@ extern NSString *NSWindowDidOrderOffScreenNotification; #ifdef TK_MAC_DEBUG_NOTIFICATIONS TKLog(@"-[%@(%p) %s] %@", [self class], self, _cmd, notification); #endif + if (![[notification object] respondsToSelector: @selector (tkLayoutChanged)]) { + return; + } [(TKWindow *)[notification object] tkLayoutChanged]; } |