summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorculler <culler>2020-10-07 22:15:15 (GMT)
committerculler <culler>2020-10-07 22:15:15 (GMT)
commitc34280047302f7c8eb273255f5ea197cd6e59c9d (patch)
tree187d8439632b2af3f6bea9f30274f822946b7e05 /macosx
parentc89a70630558480627dcf1fc39b14106b7eee218 (diff)
parentf13aa6c87705fae7111ee41caa62cddd5b99f3e0 (diff)
downloadtk-c34280047302f7c8eb273255f5ea197cd6e59c9d.zip
tk-c34280047302f7c8eb273255f5ea197cd6e59c9d.tar.gz
tk-c34280047302f7c8eb273255f5ea197cd6e59c9d.tar.bz2
Merge trunk
Diffstat (limited to 'macosx')
-rw-r--r--macosx/Tk-Common.xcconfig2
-rw-r--r--macosx/tkMacOSXScrlbr.c2
-rw-r--r--macosx/tkMacOSXSubwindows.c21
-rw-r--r--macosx/tkMacOSXWindowEvent.c9
-rw-r--r--macosx/tkMacOSXWm.c7
5 files changed, 26 insertions, 15 deletions
diff --git a/macosx/Tk-Common.xcconfig b/macosx/Tk-Common.xcconfig
index 6219135..0ece048 100644
--- a/macosx/Tk-Common.xcconfig
+++ b/macosx/Tk-Common.xcconfig
@@ -23,7 +23,7 @@ GCC_NO_COMMON_BLOCKS = YES
GCC_DYNAMIC_NO_PIC = YES
GCC_VERSION = 4.2
GCC = gcc-$(GCC_VERSION)
-WARNING_CFLAGS = -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-value -Winit-self -Wpointer-arith -Wcast-align -Wdisabled-optimization -Winline $(WARNING_CFLAGS)
+WARNING_CFLAGS = -Wall -Wextra -Wshadow -Wwrite-strings -Wpointer-arith -Winit-self -Wcast-align -Wdisabled-optimization -Winline $(WARNING_CFLAGS)
REZ_RESOURCE_MAP_READ_ONLY = YES
APPLICATION_INSTALL_PATH = /Applications/Utilities
BINDIR = $(PREFIX)/bin
diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c
index 8483cbb..3149b15 100644
--- a/macosx/tkMacOSXScrlbr.c
+++ b/macosx/tkMacOSXScrlbr.c
@@ -662,7 +662,7 @@ UpdateControlValues(
*
* ScrollbarEvent --
*
- * This procedure is invoked in response to <ButtonPress>,
+ * This procedure is invoked in response to <Button>,
* <ButtonRelease>, <EnterNotify>, and <LeaveNotify> events. The
* Scrollbar appearance is modified for each event.
*
diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c
index 5697443..53c231c 100644
--- a/macosx/tkMacOSXSubwindows.c
+++ b/macosx/tkMacOSXSubwindows.c
@@ -14,6 +14,7 @@
#include "tkMacOSXPrivate.h"
#include "tkMacOSXDebug.h"
#include "tkMacOSXWm.h"
+#include "tkMacOSXConstants.h"
/*
#ifdef TK_MAC_DEBUG
@@ -357,15 +358,19 @@ XResizeWindow(
display->request++;
if (Tk_IsTopLevel(macWin->winPtr) && !Tk_IsEmbedded(macWin->winPtr)) {
- NSWindow *w = macWin->winPtr->wmInfoPtr->window;
+ TKWindow *w = (TKWindow *)macWin->winPtr->wmInfoPtr->window;
if (w) {
- NSRect r = [w contentRectForFrameRect:[w frame]];
-
- r.origin.y += r.size.height - height;
- r.size.width = width;
- r.size.height = height;
- [w setFrame:[w frameRectForContentRect:r] display:YES];
+ if ([w styleMask] & NSFullScreenWindowMask) {
+ [w tkLayoutChanged];
+ } else {
+ NSRect r = [w contentRectForFrameRect:[w frame]];
+
+ r.origin.y += r.size.height - height;
+ r.size.width = width;
+ r.size.height = height;
+ [w setFrame:[w frameRectForContentRect:r] display:NO];
+ }
}
} else {
MoveResizeWindow(macWin);
@@ -421,7 +426,7 @@ XMoveResizeWindow(
X + XOff, TkMacOSXZeroScreenHeight() - Y - YOff - Height,
Width, Height);
- [w setFrame:[w frameRectForContentRect:r] display:YES];
+ [w setFrame:[w frameRectForContentRect:r] display:NO];
}
} else {
MoveResizeWindow(macWin);
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c
index 98bec7d..f60eb75 100644
--- a/macosx/tkMacOSXWindowEvent.c
+++ b/macosx/tkMacOSXWindowEvent.c
@@ -970,6 +970,14 @@ ConfigureRestrictProc(
TkWindow *winPtr = TkMacOSXGetTkWindow(w);
Tk_Window tkwin = (Tk_Window)winPtr;
+ /*
+ * See ticket [1fa8c3ed8d]. This may not be needed for macOSX 11.
+ */
+
+ if(![NSApp isDrawing]) {
+ return;
+ }
+
if (![self inLiveResize] &&
[w respondsToSelector: @selector (tkLayoutChanged)]) {
[(TKWindow *)w tkLayoutChanged];
@@ -1017,7 +1025,6 @@ ConfigureRestrictProc(
*/
[self generateExposeEvents: [self bounds]];
- [w displayIfNeeded];
/*
* Finally, unlock the main autoreleasePool.
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 5128631..95b84bf 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -6839,7 +6839,7 @@ ApplyWindowAttributeFlagChanges(
* after 10.10.
*/
-#if !(MAC_OS_X_VERSION_MAX_ALLOWED < 101000)
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101100
if (!(macWindow.styleMask & NSUtilityWindowMask)) {
/*
* Exclude overrideredirect, transient, and "help"-styled
@@ -6861,11 +6861,10 @@ ApplyWindowAttributeFlagChanges(
* window. To work around this we make the max size equal
* to the screen size. (For 10.11 and up, only)
*/
- if ([NSApp macOSVersion] > 101000) {
-#if !(MAC_OS_X_VERSION_MAX_ALLOWED > 101000)
+
+ if (@available(macOS 10.11, *)) {
NSSize screenSize = [[macWindow screen] frame].size;
[macWindow setMaxFullScreenContentSize:screenSize];
-#endif
}
}
}