diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-11-07 14:23:34 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-11-07 14:23:34 (GMT) |
commit | ca8b10170facddade5aed5be01082b49b0cc5d97 (patch) | |
tree | 99a0c54004df193333f869b78f209f6f138fad17 /generic/tkFocus.c | |
parent | 3a85d65678825daaa1fd30a24ea43d3de3f2f469 (diff) | |
parent | 7c2c0457c19b2402027024104641230c5d849f27 (diff) | |
download | tk-ca8b10170facddade5aed5be01082b49b0cc5d97.zip tk-ca8b10170facddade5aed5be01082b49b0cc5d97.tar.gz tk-ca8b10170facddade5aed5be01082b49b0cc5d97.tar.bz2 |
[Bug 3574708]: Move window liveness checks to better location.
Diffstat (limited to 'generic/tkFocus.c')
-rw-r--r-- | generic/tkFocus.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/generic/tkFocus.c b/generic/tkFocus.c index b5e2edf..cfd2216 100644 --- a/generic/tkFocus.c +++ b/generic/tkFocus.c @@ -153,9 +153,7 @@ Tk_FocusObjCmd( if (newPtr == NULL) { return TCL_ERROR; } - if (!(newPtr->flags & TK_ALREADY_DEAD)) { - TkSetFocusWin(newPtr, 0); - } + TkSetFocusWin(newPtr, 0); return TCL_OK; } } @@ -545,6 +543,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); /* |