diff options
author | hobbs <hobbs> | 2002-10-08 19:57:59 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2002-10-08 19:57:59 (GMT) |
commit | 74fdec4b5fbf4c92ecdb0aa2ceb66d1ecf36a790 (patch) | |
tree | f0d8feec8a36c8b2b8c7b4ef8f6bca5fd244ded2 /generic/tkFocus.c | |
parent | 0be889cba49f585258c7dced520fa81a0b8f9a65 (diff) | |
download | tk-74fdec4b5fbf4c92ecdb0aa2ceb66d1ecf36a790.zip tk-74fdec4b5fbf4c92ecdb0aa2ceb66d1ecf36a790.tar.gz tk-74fdec4b5fbf4c92ecdb0aa2ceb66d1ecf36a790.tar.bz2 |
* generic/tkFocus.c (TkFocusFilterEvent): Ignore event if we are
focusing into a dead window. [Bug #588831] (griffin)
Diffstat (limited to 'generic/tkFocus.c')
-rw-r--r-- | generic/tkFocus.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/generic/tkFocus.c b/generic/tkFocus.c index f31d2a3..93af5f5 100644 --- a/generic/tkFocus.c +++ b/generic/tkFocus.c @@ -10,7 +10,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.9 2002/06/19 19:37:54 mdejong Exp $ + * RCS: @(#) $Id: tkFocus.c,v 1.10 2002/10/08 19:57:59 hobbs Exp $ */ #include "tkInt.h" @@ -439,14 +439,21 @@ TkFocusFilterEvent(winPtr, eventPtr) } newFocusPtr = tlFocusPtr->focusWinPtr; + /* + * Ignore event if newFocus window is already dead! + */ + if (newFocusPtr->flags & TK_ALREADY_DEAD) { + return retValue; + } + if (eventPtr->type == FocusIn) { GenerateFocusEvents(displayFocusPtr->focusWinPtr, newFocusPtr); displayFocusPtr->focusWinPtr = newFocusPtr; dispPtr->focusPtr = newFocusPtr; /* - * NotifyPointer gets set when the focus has been set to the root window - * but we have the pointer. We'll treat this like an implicit + * NotifyPointer gets set when the focus has been set to the root + * window but we have the pointer. We'll treat this like an implicit * focus in event so that upon Leave events we release focus. */ |