summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp@users.sourceforge.net <dgp>2012-11-07 19:18:39 (GMT)
committerdgp@users.sourceforge.net <dgp>2012-11-07 19:18:39 (GMT)
commitcefbf6ba2ee8aaf46eea3bc200e81638f01a6d02 (patch)
treec39c29ce59e7d67c0e398481b576362f633a0e16 /generic
parent76d047b7a4dc51dabe043be48b2f3bc2359155be (diff)
parent1575d70202dda13e527b5fc091fc22cc2e67e9f4 (diff)
downloadtk-cefbf6ba2ee8aaf46eea3bc200e81638f01a6d02.zip
tk-cefbf6ba2ee8aaf46eea3bc200e81638f01a6d02.tar.gz
tk-cefbf6ba2ee8aaf46eea3bc200e81638f01a6d02.tar.bz2
merge 8.5
Diffstat (limited to 'generic')
-rw-r--r--generic/tkFocus.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/generic/tkFocus.c b/generic/tkFocus.c
index 4814c17..85093ee 100644
--- a/generic/tkFocus.c
+++ b/generic/tkFocus.c
@@ -160,9 +160,7 @@ Tk_FocusObjCmd(
if (newPtr == NULL) {
return TCL_ERROR;
}
- if (!(newPtr->flags & TK_ALREADY_DEAD)) {
- TkSetFocusWin(newPtr, 0);
- }
+ TkSetFocusWin(newPtr, 0);
return TCL_OK;
}
}
@@ -552,6 +550,14 @@ TkSetFocusWin(
TkWindow *topLevelPtr;
int allMapped, serial;
+ /*
+ * Don't set focus if window is already dead. [Bug 3574708]
+ */
+
+ if (winPtr->flags & TK_ALREADY_DEAD) {
+ return;
+ }
+
displayFocusPtr = FindDisplayFocusInfo(winPtr->mainPtr, winPtr->dispPtr);
/*