diff options
author | hobbs <hobbs> | 2004-09-10 18:47:20 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2004-09-10 18:47:20 (GMT) |
commit | aaffbf1904796dbd384994157920b254c1edf113 (patch) | |
tree | bce90fa0e5cffd90eb69a318e50396aee5665d8f | |
parent | a3d5c8df3363ba5605724c4a8c6ae9ea5d92ca5c (diff) | |
download | tk-aaffbf1904796dbd384994157920b254c1edf113.zip tk-aaffbf1904796dbd384994157920b254c1edf113.tar.gz tk-aaffbf1904796dbd384994157920b254c1edf113.tar.bz2 |
* win/tkWinWm.c (ActivateWindow): SetFocus to grab window when
clicking outside the grab window hierarchy. [Bug 220908]
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | win/tkWinWm.c | 13 |
2 files changed, 14 insertions, 4 deletions
@@ -1,3 +1,8 @@ +2004-09-10 Jeff Hobbs <jeffh@ActiveState.com> + + * win/tkWinWm.c (ActivateWindow): SetFocus to grab window when + clicking outside the grab window hierarchy. [Bug 220908] + 2004-09-09 Jeff Hobbs <jeffh@ActiveState.com> * win/tkWinWm.c: backport of several items from 8.5 head: diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 32fbf0f..b7817d6 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinWm.c,v 1.54.2.3 2004/09/10 04:59:38 hobbs Exp $ + * RCS: @(#) $Id: tkWinWm.c,v 1.54.2.4 2004/09/10 18:47:21 hobbs Exp $ */ #include "tkWinInt.h" @@ -7226,11 +7226,16 @@ ActivateWindow( winPtr = ((ActivateEvent *) evPtr)->winPtr; /* - * Ensure that the window is not excluded by a grab. + * If the window is excluded by a grab, call SetFocus on the + * grabbed window instead. [Bug 220908] */ - if (winPtr && (TkGrabState(winPtr) != TK_GRAB_EXCLUDED)) { - SetFocus(Tk_GetHWND(winPtr->window)); + if (winPtr) { + if (TkGrabState(winPtr) != TK_GRAB_EXCLUDED) { + SetFocus(Tk_GetHWND(winPtr->window)); + } else { + SetFocus(Tk_GetHWND(winPtr->dispPtr->grabWinPtr->window)); + } } return 1; |