summaryrefslogtreecommitdiffstats
path: root/win/tkWinWm.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tkWinWm.c')
-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) {
/*