summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--win/tkWinWm.c12
2 files changed, 17 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6f2e213..e61005c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-06-12 Anton Kovalenko <a_kovalenko@users.sourceforge.net>
+
+ * win/tkWinWm.c (UpdateWrapper): Let overrideredirect'ed window's
+ wrapper be the child of desktop window, thus making it to behave more
+ similarly to X11 Override Redirect. Esp. useful for combobox-like
+ megawidgets.
+
2004-06-09 Vince Darley <vincentdarley@users.sourceforge.net>
* generic/tkText.c:
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index 86f2073..f2af06f 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.61 2004/05/08 03:53:57 chengyemao Exp $
+ * RCS: @(#) $Id: tkWinWm.c,v 1.62 2004/06/12 05:38:45 a_kovalenko Exp $
*/
#include "tkWinInt.h"
@@ -315,7 +315,7 @@ typedef struct TkWmInfo {
* Window styles for various types of toplevel windows.
*/
-#define WM_OVERRIDE_STYLE (WS_POPUP|WS_CLIPCHILDREN|CS_DBLCLKS)
+#define WM_OVERRIDE_STYLE (WS_CHILD|WS_CLIPCHILDREN|WS_CLIPSIBLINGS|CS_DBLCLKS)
#define EX_OVERRIDE_STYLE (WS_EX_TOOLWINDOW)
#define WM_TOPLEVEL_STYLE (WS_OVERLAPPEDWINDOW|WS_CLIPCHILDREN|CS_DBLCLKS)
@@ -1848,6 +1848,7 @@ UpdateWrapper(winPtr)
if (winPtr->atts.override_redirect) {
wmPtr->style = WM_OVERRIDE_STYLE;
wmPtr->exStyle = EX_OVERRIDE_STYLE;
+ parentHWND = GetDesktopWindow();
} else if (wmPtr->masterPtr) {
wmPtr->style = WM_TRANSIENT_STYLE;
wmPtr->exStyle = EX_TRANSIENT_STYLE;
@@ -2056,6 +2057,13 @@ UpdateWrapper(winPtr)
}
/*
+ * To keep the standard Tk behavior, we must raise override_redirected
+ * window manually
+ */
+ if (winPtr->atts.override_redirect) {
+ TkWinSetWindowPos(wmPtr->wrapper, NULL, Above);
+ }
+ /*
* If this is the first window created by the application, then
* we should activate the initial window.
*/