summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-11-07 19:18:39 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-11-07 19:18:39 (GMT)
commit2b22e49d28156de7a95fbda5cf28ff7d18bbdf51 (patch)
treec39c29ce59e7d67c0e398481b576362f633a0e16 /generic
parentecf35360551aca4a6a30a19bbdf6a68b6523fb8e (diff)
parent7a9728f81b02f84b4d10e87ae7cfde37f65e9e79 (diff)
downloadtk-2b22e49d28156de7a95fbda5cf28ff7d18bbdf51.zip
tk-2b22e49d28156de7a95fbda5cf28ff7d18bbdf51.tar.gz
tk-2b22e49d28156de7a95fbda5cf28ff7d18bbdf51.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);
/*