diff options
author | stanton <stanton> | 1998-06-12 16:20:16 (GMT) |
---|---|---|
committer | stanton <stanton> | 1998-06-12 16:20:16 (GMT) |
commit | 301e8466c3b87c6dec019c0ecfd360b9f3560075 (patch) | |
tree | 7a15b2d4edb8a8c75ca56fe9d4d163464730aab5 /win/tkWinPointer.c | |
parent | a9ba16dbb50729ae9d08c490ff5a0e2104b14f58 (diff) | |
download | tk-301e8466c3b87c6dec019c0ecfd360b9f3560075.zip tk-301e8466c3b87c6dec019c0ecfd360b9f3560075.tar.gz tk-301e8466c3b87c6dec019c0ecfd360b9f3560075.tar.bz2 |
changed so focus -force also sets the foreground window
Diffstat (limited to 'win/tkWinPointer.c')
-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); |