From 74fdec4b5fbf4c92ecdb0aa2ceb66d1ecf36a790 Mon Sep 17 00:00:00 2001 From: hobbs Date: Tue, 8 Oct 2002 19:57:59 +0000 Subject: * generic/tkFocus.c (TkFocusFilterEvent): Ignore event if we are focusing into a dead window. [Bug #588831] (griffin) --- generic/tkFocus.c | 13 ++++++++++--- 1 file 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. */ -- cgit v0.12