diff options
Diffstat (limited to 'win')
-rw-r--r-- | win/tkWinButton.c | 10 | ||||
-rw-r--r-- | win/tkWinMenu.c | 4 | ||||
-rw-r--r-- | win/tkWinWm.c | 11 |
3 files changed, 18 insertions, 7 deletions
diff --git a/win/tkWinButton.c b/win/tkWinButton.c index 6f2602c..2d8e0bc 100644 --- a/win/tkWinButton.c +++ b/win/tkWinButton.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinButton.c,v 1.5 1999/04/21 21:53:32 rjohnson Exp $ + * RCS: @(#) $Id: tkWinButton.c,v 1.5.6.1 1999/09/22 06:53:24 hobbs Exp $ */ #define OEMRESOURCE @@ -789,6 +789,14 @@ ButtonProc(hwnd, message, wParam, lParam) BeginPaint(hwnd, &ps); EndPaint(hwnd, &ps); TkpDisplayButton((ClientData)butPtr); + + /* + * Special note: must cancel any existing idle handler + * for TkpDisplayButton; it's no longer needed, and + * TkpDisplayButton cleared the REDRAW_PENDING flag. + */ + + Tcl_CancelIdleCall(TkpDisplayButton, (ClientData)butPtr); return 0; } case BN_CLICKED: { diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c index b39d584..4b1a1b5 100644 --- a/win/tkWinMenu.c +++ b/win/tkWinMenu.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinMenu.c,v 1.5 1999/04/16 01:51:52 stanton Exp $ + * RCS: @(#) $Id: tkWinMenu.c,v 1.5.6.1 1999/09/22 06:53:24 hobbs Exp $ */ #define OEMRESOURCE @@ -2716,7 +2716,7 @@ SetDefaults( } SelectObject(scratchDC, menuFont); GetTextMetrics(scratchDC, &tm); - GetTextFace(scratchDC, sizeof(menuFontDString), faceName); + GetTextFace(scratchDC, LF_FACESIZE, faceName); pointSize = MulDiv(tm.tmHeight - tm.tmInternalLeading, 72, GetDeviceCaps(scratchDC, LOGPIXELSY)); if (tm.tmWeight >= 700) { diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 822735e..a689649 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.10 1999/08/10 16:58:52 hobbs Exp $ + * RCS: @(#) $Id: tkWinWm.c,v 1.10.4.1 1999/09/22 06:53:25 hobbs Exp $ */ #include "tkWinInt.h" @@ -1392,10 +1392,13 @@ Tk_WmCmd(clientData, interp, argc, argv) TkpWmSetState(winPtr, NormalState); /* * Follow Windows-like style here: - * raise the window to the top and force the focus on it + * raise the window to the top, and if it isn't overridden, + * then force the focus on it */ - Tk_RestackWindow(tkwin, Above, NULL); - TkSetFocusWin(winPtr, 1); + TkWmRestackToplevel(winPtr, Above, NULL); + if (!(Tk_Attributes((Tk_Window) winPtr)->override_redirect)) { + TkSetFocusWin(winPtr, 1); + } } else if ((c == 'f') && (strncmp(argv[1], "focusmodel", length) == 0) && (length >= 2)) { if ((argc != 3) && (argc != 4)) { |