summaryrefslogtreecommitdiffstats
path: root/generic/tkFocus.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-10-08 19:57:59 (GMT)
committerhobbs <hobbs>2002-10-08 19:57:59 (GMT)
commita3f39e96ca857d6194660fbe99ec36179a887151 (patch)
treef0d8feec8a36c8b2b8c7b4ef8f6bca5fd244ded2 /generic/tkFocus.c
parenta47a91bcc866a1a7d00ded7e8ef03d7ca5cb5e73 (diff)
downloadtk-a3f39e96ca857d6194660fbe99ec36179a887151.zip
tk-a3f39e96ca857d6194660fbe99ec36179a887151.tar.gz
tk-a3f39e96ca857d6194660fbe99ec36179a887151.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.c13
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.
*/