summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorhobbs <hobbs>2005-12-01 07:34:20 (GMT)
committerhobbs <hobbs>2005-12-01 07:34:20 (GMT)
commitb5ed9a2687177fecfe6839deae0aefa98289dace (patch)
tree1fb2dc8735a23eb2f89b253240f09a72e36bbeb5 /win
parent4cd04ee31b81888a78ef6b97278b638d473bb7b4 (diff)
downloadtk-b5ed9a2687177fecfe6839deae0aefa98289dace.zip
tk-b5ed9a2687177fecfe6839deae0aefa98289dace.tar.gz
tk-b5ed9a2687177fecfe6839deae0aefa98289dace.tar.bz2
* win/tkWinWm.c (WmAttributesCmd): set (no)topmost window aspect
before rewrapping. [Bug 1086049]
Diffstat (limited to 'win')
-rw-r--r--win/tkWinWm.c16
1 files changed, 14 insertions, 2 deletions
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) {
/*