summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstanton <stanton>1998-06-12 16:20:16 (GMT)
committerstanton <stanton>1998-06-12 16:20:16 (GMT)
commit301e8466c3b87c6dec019c0ecfd360b9f3560075 (patch)
tree7a15b2d4edb8a8c75ca56fe9d4d163464730aab5
parenta9ba16dbb50729ae9d08c490ff5a0e2104b14f58 (diff)
downloadtk-301e8466c3b87c6dec019c0ecfd360b9f3560075.zip
tk-301e8466c3b87c6dec019c0ecfd360b9f3560075.tar.gz
tk-301e8466c3b87c6dec019c0ecfd360b9f3560075.tar.bz2
changed so focus -force also sets the foreground window
-rw-r--r--win/tkWinPointer.c9
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);