diff options
author | hobbs <hobbs> | 2005-12-01 07:34:20 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2005-12-01 07:34:20 (GMT) |
commit | b5ed9a2687177fecfe6839deae0aefa98289dace (patch) | |
tree | 1fb2dc8735a23eb2f89b253240f09a72e36bbeb5 | |
parent | 4cd04ee31b81888a78ef6b97278b638d473bb7b4 (diff) | |
download | tk-b5ed9a2687177fecfe6839deae0aefa98289dace.zip tk-b5ed9a2687177fecfe6839deae0aefa98289dace.tar.gz tk-b5ed9a2687177fecfe6839deae0aefa98289dace.tar.bz2 |
* win/tkWinWm.c (WmAttributesCmd): set (no)topmost window aspect
before rewrapping. [Bug 1086049]
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | win/tkWinWm.c | 16 |
2 files changed, 17 insertions, 2 deletions
@@ -5,6 +5,9 @@ 2005-11-30 Jeff Hobbs <jeffh@ActiveState.com> + * win/tkWinWm.c (WmAttributesCmd): set (no)topmost window aspect + before rewrapping. [Bug 1086049] + * macosx/tkMacOSXXStubs.c (TkpOpenDisplay, TkMacOSXDisplayChanged): * macosx/tkMacOSXWindowEvent.c (TkMacOSXProcessApplicationEvent): * macosx/tkMacOSXCarbonEvents.c (TkMacOSXInitCarbonEvents): diff --git a/win/tkWinWm.c b/win/tkWinWm.c index f52942e..3fbad34 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.102 2005/10/05 00:43:45 chengyemao Exp $ + * RCS: @(#) $Id: tkWinWm.c,v 1.103 2005/12/01 07:34:20 hobbs Exp $ */ #include "tkWinInt.h" @@ -3091,7 +3091,8 @@ WmAttributesCmd(tkwin, winPtr, interp, objc, objv) } else { *stylePtr &= ~styleBit; } - if (setLayeredWindowAttributesProc != NULL) { + if ((setLayeredWindowAttributesProc != NULL) + && (wmPtr->wrapper != NULL)) { /* * Set the window directly regardless of UpdateWrapper. * The user supplies a double from [0..1], but Windows @@ -3127,6 +3128,17 @@ WmAttributesCmd(tkwin, winPtr, interp, objc, objv) *stylePtr &= ~styleBit; } } + if ((styleBit == WS_EX_TOPMOST) && (wmPtr->wrapper != NULL)) { + /* + * Force the topmost position aspect to ensure that switching + * between (no)topmost reflects properly when rewrapped. + */ + SetWindowPos(wmPtr->wrapper, + ((exStyle & WS_EX_TOPMOST) ? + HWND_TOPMOST : HWND_NOTOPMOST), 0, 0, 0, 0, + SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE|SWP_NOSENDCHANGING + |SWP_NOOWNERZORDER); + } } if (wmPtr->styleConfig != style) { /* |