summaryrefslogtreecommitdiffstats
path: root/generic/tkWindow.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2018-06-12 19:35:54 (GMT)
committerfvogel <fvogelnew1@free.fr>2018-06-12 19:35:54 (GMT)
commit4e905500fbb8c158566a10ed26cb712d43c85511 (patch)
tree16439f39d9fc18abcd108c50da904357eeaf1a85 /generic/tkWindow.c
parent6f2d81146fb9272cccf3f5fd9ffbeed083d20f6c (diff)
parentc312dabab440df7f8ff872a097025538c86f7384 (diff)
downloadtk-4e905500fbb8c158566a10ed26cb712d43c85511.zip
tk-4e905500fbb8c158566a10ed26cb712d43c85511.tar.gz
tk-4e905500fbb8c158566a10ed26cb712d43c85511.tar.bz2
Further fix for [1821174fff], by Christian Werner. Also, remove or replace deprecated calls in the macOS implementation (by Marc Culler).
Diffstat (limited to 'generic/tkWindow.c')
-rw-r--r--generic/tkWindow.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index ef06a5b..9afb22f 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -2787,6 +2787,18 @@ DeleteWindowsExitProc(
}
/*
+ * Let error handlers catch up before actual close of displays.
+ * Must be done before tsdPtr->displayList is cleared, otherwise
+ * ErrorProc() in tkError.c cannot associate the pending X errors
+ * to the remaining error handlers.
+ */
+
+ for (dispPtr = tsdPtr->displayList; dispPtr != NULL;
+ dispPtr = dispPtr->nextPtr) {
+ XSync(dispPtr->display, False);
+ }
+
+ /*
* Iterate destroying the displays until no more displays remain. It is
* possible for displays to get recreated during exit by any code that
* calls GetScreen, so we must destroy these new displays as well as the