summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2005-12-01 07:34:54 (GMT)
committerhobbs <hobbs>2005-12-01 07:34:54 (GMT)
commitaccc4141f85362e60909c61deb5694892390ace7 (patch)
tree5b0aa90c5851642a7d8ecb34a38ecdf490031905
parent10aca77184a8c4b9f653e0f80d04f96135a1041b (diff)
downloadtk-accc4141f85362e60909c61deb5694892390ace7.zip
tk-accc4141f85362e60909c61deb5694892390ace7.tar.gz
tk-accc4141f85362e60909c61deb5694892390ace7.tar.bz2
* win/tkWinWm.c (WmAttributesCmd): set (no)topmost window aspect
before rewrapping. [Bug 1086049]
-rw-r--r--ChangeLog3
-rw-r--r--win/tkWinWm.c16
2 files changed, 17 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 08ab9c2..96c03b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,9 @@
2005-11-30 Jeff Hobbs <jeffh@ActiveState.com>
+ * win/tkWinWm.c (WmAttributesCmd): set (no)topmost window aspect
+ before rewrapping. [Bug 1086049]
+
* generic/tkImgGIF.c: cast calls to block_out
* win/Makefile.in: place TCL_BIN_DIR first in PATH for targets to
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) {
/*