diff options
author | stanton <stanton@noemail.net> | 1998-06-12 16:20:15 (GMT) |
---|---|---|
committer | stanton <stanton@noemail.net> | 1998-06-12 16:20:15 (GMT) |
commit | ca0a45194a3527ffb7f586a60c0dcba90db49c14 (patch) | |
tree | 7a15b2d4edb8a8c75ca56fe9d4d163464730aab5 /win | |
parent | 0cf797655d12261e554b19a50c18e85fffcc4df3 (diff) | |
download | tk-ca0a45194a3527ffb7f586a60c0dcba90db49c14.zip tk-ca0a45194a3527ffb7f586a60c0dcba90db49c14.tar.gz tk-ca0a45194a3527ffb7f586a60c0dcba90db49c14.tar.bz2 |
changed so focus -force also sets the foreground window
FossilOrigin-Name: d61bfcc0bf463c800ec34822ac5ea3b02917ae0f
Diffstat (limited to 'win')
-rw-r--r-- | win/tkWinPointer.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/win/tkWinPointer.c b/win/tkWinPointer.c index 96661ae..d62161f 100644 --- a/win/tkWinPointer.c +++ b/win/tkWinPointer.c @@ -409,6 +409,15 @@ TkpChangeFocus(winPtr, force) if (winPtr->window == None) { panic("ChangeXFocus got null X window"); } + + /* + * Change the foreground window so the focus window is raised to the top of + * the system stacking order and gets the keyboard focus. + */ + + if (force) { + SetForegroundWindow(Tk_GetHWND(winPtr->window)); + } XSetInputFocus(dispPtr->display, winPtr->window, RevertToParent, CurrentTime); |