diff options
author | donal.k.fellows@manchester.ac.uk <dkf> | 2009-07-22 05:35:38 (GMT) |
---|---|---|
committer | donal.k.fellows@manchester.ac.uk <dkf> | 2009-07-22 05:35:38 (GMT) |
commit | c58ae125d1e2a1f82287d187d04da3eba8971c44 (patch) | |
tree | f9f2dd55f7a3a066b58377dfa9a3e56ff10940fd /generic/tkFocus.c | |
parent | 9a611e18bcb7f9900bc800f7b7edd88767a2d583 (diff) | |
download | tk-c58ae125d1e2a1f82287d187d04da3eba8971c44.zip tk-c58ae125d1e2a1f82287d187d04da3eba8971c44.tar.gz tk-c58ae125d1e2a1f82287d187d04da3eba8971c44.tar.bz2 |
[Bug 2496114]: Ensure that focus desynchronization doesn't cause a crash.
Diffstat (limited to 'generic/tkFocus.c')
-rw-r--r-- | generic/tkFocus.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/generic/tkFocus.c b/generic/tkFocus.c index b3696d1..1c8a682 100644 --- a/generic/tkFocus.c +++ b/generic/tkFocus.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkFocus.c,v 1.21 2009/02/03 23:55:47 nijtmans Exp $ + * RCS: @(#) $Id: tkFocus.c,v 1.22 2009/07/22 05:35:38 dkf Exp $ */ #include "tkInt.h" @@ -859,6 +859,16 @@ TkFocusDeadWindow( } } + /* + * Occasionally, things can become unsynchronized. Move them back into + * synch now. [Bug 2496114] + */ + + if (displayFocusPtr->focusWinPtr == winPtr) { + DEBUG(dispPtr, ("focus cleared after %s died\n", winPtr->pathName)); + displayFocusPtr->focusWinPtr = NULL; + } + if (displayFocusPtr->focusOnMapPtr == winPtr) { displayFocusPtr->focusOnMapPtr = NULL; } |