From 4bfd936e33fa61f06ad6c48c1e4366766026be22 Mon Sep 17 00:00:00 2001 From: a_kovalenko Date: Sat, 12 Jun 2004 05:38:40 +0000 Subject: * 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. --- ChangeLog | 7 +++++++ win/tkWinWm.c | 12 ++++++++++-- 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 + + * 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 * 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. */ -- cgit v0.12