diff options
author | redman <redman> | 1999-03-10 19:29:24 (GMT) |
---|---|---|
committer | redman <redman> | 1999-03-10 19:29:24 (GMT) |
commit | 79af7a3035aee0515128033a6b0af599d1a29801 (patch) | |
tree | 3d1fd36e76f149caa4d65870b7aa310f6864d4a9 /win/tkWinWm.c | |
parent | 824bd0f38f575bdd5a561fd96eb625748cf340f9 (diff) | |
download | tk-79af7a3035aee0515128033a6b0af599d1a29801.zip tk-79af7a3035aee0515128033a6b0af599d1a29801.tar.gz tk-79af7a3035aee0515128033a6b0af599d1a29801.tar.bz2 |
Backported "focus -force" patch from 8.1.
Diffstat (limited to 'win/tkWinWm.c')
-rw-r--r-- | win/tkWinWm.c | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 98414e2..a0ed0ae 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.6 1999/02/04 21:01:46 stanton Exp $ + * RCS: @(#) $Id: tkWinWm.c,v 1.7 1999/03/10 19:29:24 redman Exp $ */ #include "tkWinInt.h" @@ -4235,3 +4235,34 @@ ActivateWindow( return 1; } + +/* + *---------------------------------------------------------------------- + * + * TkWinSetForegroundWindow -- + * + * This function is a wrapper for SetForegroundWindow, calling + * it on the wrapper window because it has no affect on child + * windows. + * + * Results: + * none + * + * Side effects: + * May activate the toplevel window. + * + *---------------------------------------------------------------------- + */ + +void +TkWinSetForegroundWindow(winPtr) + TkWindow *winPtr; +{ + register WmInfo *wmPtr = winPtr->wmInfoPtr; + + if (wmPtr->wrapper != NULL) { + SetForegroundWindow(wmPtr->wrapper); + } else { + SetForegroundWindow(Tk_GetHWND(winPtr->window)); + } +} |