diff options
author | hobbs <hobbs> | 2005-12-01 07:34:54 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2005-12-01 07:34:54 (GMT) |
commit | accc4141f85362e60909c61deb5694892390ace7 (patch) | |
tree | 5b0aa90c5851642a7d8ecb34a38ecdf490031905 /win | |
parent | 10aca77184a8c4b9f653e0f80d04f96135a1041b (diff) | |
download | tk-accc4141f85362e60909c61deb5694892390ace7.zip tk-accc4141f85362e60909c61deb5694892390ace7.tar.gz tk-accc4141f85362e60909c61deb5694892390ace7.tar.bz2 |
* win/tkWinWm.c (WmAttributesCmd): set (no)topmost window aspect
before rewrapping. [Bug 1086049]
Diffstat (limited to 'win')
-rw-r--r-- | win/tkWinWm.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 52086ef..4db7a24 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.54.2.21 2005/11/30 22:58:07 hobbs Exp $ + * RCS: @(#) $Id: tkWinWm.c,v 1.54.2.22 2005/12/01 07:34:54 hobbs Exp $ */ #include "tkWinInt.h" @@ -2959,7 +2959,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 @@ -2986,6 +2987,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) { /* |