summaryrefslogtreecommitdiffstats
path: root/generic/tkPointer.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2019-08-26 10:01:17 (GMT)
committerfvogel <fvogelnew1@free.fr>2019-08-26 10:01:17 (GMT)
commitcc20d8e7206d31689da6dc6f795c282e3a94b8bf (patch)
tree22400beab4ccaefabaa5c1f1bd672fff529340fe /generic/tkPointer.c
parente5845ff546364f25ae5975f00bf7e2756f4d692d (diff)
downloadtk-cc20d8e7206d31689da6dc6f795c282e3a94b8bf.zip
tk-cc20d8e7206d31689da6dc6f795c282e3a94b8bf.tar.gz
tk-cc20d8e7206d31689da6dc6f795c282e3a94b8bf.tar.bz2
Fix [943d5ebe51]: Destroying a widget cancels resizing of main window on Windows. (Note: Branch builds and works on Windows, will not build (yet) on Linux or macOS)
Diffstat (limited to 'generic/tkPointer.c')
-rw-r--r--generic/tkPointer.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/generic/tkPointer.c b/generic/tkPointer.c
index de9d49d..7f1d113 100644
--- a/generic/tkPointer.c
+++ b/generic/tkPointer.c
@@ -503,7 +503,15 @@ TkPointerDeadWindow(
tsdPtr->restrictWinPtr = NULL;
}
if (!(tsdPtr->restrictWinPtr || tsdPtr->grabWinPtr)) {
- TkpSetCapture(NULL);
+
+ /*
+ * Release mouse capture only if the dead window is the capturing
+ * window.
+ */
+
+ if (winPtr == TkpGetCapture()) {
+ TkpSetCapture(NULL);
+ }
}
}