summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-11 16:44:57 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-11 16:44:57 (GMT)
commit487dd0c89feb7175291a98b61cbb039cc31930d8 (patch)
tree61d1ebc62e775cbf367be7c445cf762d9e4d80c3
parent9b39d093b32fe5818d228861d5320ef3ca93f8a5 (diff)
parentcb3a0ab0484b6747c2055c04530979b75363ca54 (diff)
downloadtk-487dd0c89feb7175291a98b61cbb039cc31930d8.zip
tk-487dd0c89feb7175291a98b61cbb039cc31930d8.tar.gz
tk-487dd0c89feb7175291a98b61cbb039cc31930d8.tar.bz2
Merge trunk
-rw-r--r--macosx/tkMacOSXWindowEvent.c16
-rw-r--r--tests/select.test6
2 files changed, 9 insertions, 13 deletions
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c
index f60eb75..c585fa2 100644
--- a/macosx/tkMacOSXWindowEvent.c
+++ b/macosx/tkMacOSXWindowEvent.c
@@ -970,14 +970,6 @@ 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];
@@ -1021,10 +1013,14 @@ ConfigureRestrictProc(
TkMacOSXUpdateClipRgn(winPtr);
/*
- * Generate and process expose events to redraw the window.
+ * Generate and process expose events to redraw the window. To avoid
+ * crashes, only do this if we are being called from drawRect. See
+ * ticket [1fa8c3ed8d].
*/
- [self generateExposeEvents: [self bounds]];
+ if([NSApp isDrawing] || [self inLiveResize]) {
+ [self generateExposeEvents: [self bounds]];
+ }
/*
* Finally, unlock the main autoreleasePool.
diff --git a/tests/select.test b/tests/select.test
index e6b9523..bb532ba 100644
--- a/tests/select.test
+++ b/tests/select.test
@@ -896,7 +896,7 @@ test select-9.1 {SelCvtToX and SelCvtFromX procedures} -setup {
test select-9.2 {SelCvtToX and SelCvtFromX procedures} -setup {
setup
setupbg
-} -constraints x11 -body {
+} -constraints {x11 failsOnUbuntu} -body {
set selValue "1024 0xffff 2048 -2 "
set selInfo ""
selection handle -selection PRIMARY -format INTEGER -type TEST \
@@ -1022,7 +1022,7 @@ test select-10.4 {ConvertSelection procedure} -constraints {
lappend result $selInfo
} -result {{selection owner didn't respond} {STRING 0 4000 STRING 4000 4000 STRING 8000 4000 STRING 12000 4000 STRING 16000 4000 STRING 0 4000 STRING 4000 4000}}
test select-10.5 {ConvertSelection procedure, reentrancy issues} -constraints {
- x11
+ x11 failsOnUbuntu
} -setup {
setup
setupbg
@@ -1060,7 +1060,7 @@ test select-10.6 {ConvertSelection procedure, reentrancy issues} -constraints {
##############################################################################
# testing reentrancy
-test select-11.1 {TkSelPropProc procedure} -constraints x11 -setup {
+test select-11.1 {TkSelPropProc procedure} -constraints {x11 failsOnUbuntu} -setup {
setup
setupbg
} -body {