summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authora_kovalenko <a_kovalenko>2004-06-12 05:38:40 (GMT)
committera_kovalenko <a_kovalenko>2004-06-12 05:38:40 (GMT)
commit4bfd936e33fa61f06ad6c48c1e4366766026be22 (patch)
tree92f49e873ed951e32e41bd272cfd29ae0bd81c30
parent0b71076e3eceb87fa71e4c4bb8586af4d7daf74f (diff)
downloadtk-4bfd936e33fa61f06ad6c48c1e4366766026be22.zip
tk-4bfd936e33fa61f06ad6c48c1e4366766026be22.tar.gz
tk-4bfd936e33fa61f06ad6c48c1e4366766026be22.tar.bz2
* 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.
-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.
*/