| Description: |
OriginalBugID: 587 Bug
Version: 8.0p2
SubmitDate: '1998-05-21'
LastModified: '1998-06-12'
Severity: LOW
Status: Released
Submitter: stanton
ChangedBy: stanton
OS: All Windows
OSVersion: NA
Machine: NA
FixedInVersion: NA
ClosedDate: '1998-06-12'
With Tk8.0p2 and Tk8.1a2 on Windows, the focus -force option only
calls SetFocus. This is OK, but when focus -force is used in practice
on Windows I think the user really wants to make the window the new
foreground window, particularly since Tk doesn't provide any other
mechanism to set the foreground window.
The appended patch implements this suggested change.
Ian Taylor
[email protected]
*** /5g/ian/tk8.0p2/win/tkWinPointer.c Fri Oct 31 11:40:05 1997
--- tkWinPointer.c Wed Apr 15 15:13:30 1998
*************** TkpChangeFocus(winPtr, force)
*** 409,414 ****
--- 409,419 ----
if (winPtr->window == None) {
panic("ChangeXFocus got null X window");
}
+
+ if (force) {
+ SetForegroundWindow(Tk_GetHWND(winPtr->window));
+ }
+
XSetInputFocus(dispPtr->display, winPtr->window, RevertToParent,
CurrentTime);
The supplied patch seems to work correctly, so I have integrated it. (SS)
|