summaryrefslogtreecommitdiffstats
path: root/win/tkWinWm.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2004-09-10 18:45:21 (GMT)
committerhobbs <hobbs>2004-09-10 18:45:21 (GMT)
commit419e6683b89b881a1baee8785a7509ea33faa3ae (patch)
treeb88f25bce2938b016e7c13a0692459c0ee52467c /win/tkWinWm.c
parent545f2bbda7598242afb10a70a2ea91c5648f87fe (diff)
downloadtk-419e6683b89b881a1baee8785a7509ea33faa3ae.zip
tk-419e6683b89b881a1baee8785a7509ea33faa3ae.tar.gz
tk-419e6683b89b881a1baee8785a7509ea33faa3ae.tar.bz2
* win/tkWinWm.c (ActivateWindow): SetFocus to grab window when
clicking outside the grab window hierarchy. [Bug 220908]
Diffstat (limited to 'win/tkWinWm.c')
-rw-r--r--win/tkWinWm.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index 5e5e39a..80240a8 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.65 2004/09/10 04:50:44 hobbs Exp $
+ * RCS: @(#) $Id: tkWinWm.c,v 1.66 2004/09/10 18:45:23 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;