From 7232648b41b68bdd036d35aed2b081ba08809e55 Mon Sep 17 00:00:00 2001 From: mdejong Date: Thu, 23 May 2002 19:55:17 +0000 Subject: * mac/tkMacWm.c (TkWmStackorderToplevelWrapperMap): * tests/wm.test: Add embedded Window test case for the stackorder command. * unix/tkUnixWm.c (TkWmStackorderToplevelWrapperMap): * win/tkWinWm.c (TkWmStackorderToplevelWrapperMap): Ignore embedded windows during wm stackorder command. --- ChangeLog | 9 +++++++++ mac/tkMacWm.c | 5 +++-- tests/wm.test | 15 +++++++++------ unix/tkUnixWm.c | 5 +++-- win/tkWinWm.c | 5 +++-- 5 files changed, 27 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index f78e5e6..37ccd2b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2002-05-23 Mo DeJong + + * mac/tkMacWm.c (TkWmStackorderToplevelWrapperMap): + * tests/wm.test: Add embedded Window test case for + the stackorder command. + * unix/tkUnixWm.c (TkWmStackorderToplevelWrapperMap): + * win/tkWinWm.c (TkWmStackorderToplevelWrapperMap): + Ignore embedded windows during wm stackorder command. + 2002-05-21 Mo DeJong * unix/configure: Regen. diff --git a/mac/tkMacWm.c b/mac/tkMacWm.c index 8e1e677..1d2a8c5 100644 --- a/mac/tkMacWm.c +++ b/mac/tkMacWm.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacWm.c,v 1.15 2002/04/10 19:39:01 mdejong Exp $ + * RCS: @(#) $Id: tkMacWm.c,v 1.16 2002/05/23 19:55:18 mdejong Exp $ */ #include @@ -3047,7 +3047,8 @@ TkWmStackorderToplevelWrapperMap(winPtr, table) WindowPeek wrapper; int newEntry; - if (Tk_IsMapped(winPtr) && Tk_IsTopLevel(winPtr)) { + if (Tk_IsMapped(winPtr) && Tk_IsTopLevel(winPtr) && + !Tk_IsEmbedded(winPtr)) { wrapper = (WindowPeek) TkMacGetDrawablePort(winPtr->window); hPtr = Tcl_CreateHashEntry(table, diff --git a/tests/wm.test b/tests/wm.test index 3b611ef..7dc6970 100644 --- a/tests/wm.test +++ b/tests/wm.test @@ -7,7 +7,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: wm.test,v 1.3 2002/04/10 19:39:01 mdejong Exp $ +# RCS: @(#) $Id: wm.test,v 1.4 2002/05/23 19:55:18 mdejong Exp $ # This file tests window manager interactions that work across # platforms. Window manager tests that only work on a specific @@ -293,15 +293,18 @@ test wm-stackorder-5.3 {An overrideredirect window wm stackorder .t isbelow . } 1 - -deleteWindows +test wm-stackorder-6.1 {An embedded toplevel does not + appear in the stacking order} { + deleteWindows + toplevel .real + toplevel .embd -bg blue -use [winfo id .real] + update + wm stackorder . +} {. .real} # FIXME: -# Need test cases for embedded Windows, they should not appear in -# the stacking order since they are not actually toplevel Windows. - # Test delivery of virtual events to the WM. We could check to see # if the window was raised after a button click for example. # This sort of testing may not be possible. diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c index 2ad7401..5fbd83b 100644 --- a/unix/tkUnixWm.c +++ b/unix/tkUnixWm.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: tkUnixWm.c,v 1.15 2002/04/12 10:01:13 hobbs Exp $ + * RCS: @(#) $Id: tkUnixWm.c,v 1.16 2002/05/23 19:55:18 mdejong Exp $ */ #include "tkPort.h" @@ -4253,7 +4253,8 @@ TkWmStackorderToplevelWrapperMap(winPtr, table) Window wrapper; int newEntry; - if (Tk_IsMapped(winPtr) && Tk_IsTopLevel(winPtr)) { + if (Tk_IsMapped(winPtr) && Tk_IsTopLevel(winPtr) && + !Tk_IsEmbedded(winPtr)) { wrapper = (winPtr->wmInfoPtr->reparent != None) ? winPtr->wmInfoPtr->reparent : winPtr->wmInfoPtr->wrapperPtr->window; diff --git a/win/tkWinWm.c b/win/tkWinWm.c index fe149eb..588ac71 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.35 2002/04/10 19:39:01 mdejong Exp $ + * RCS: @(#) $Id: tkWinWm.c,v 1.36 2002/05/23 19:55:19 mdejong Exp $ */ #include "tkWinInt.h" @@ -4335,7 +4335,8 @@ TkWmStackorderToplevelWrapperMap(winPtr, table) HWND wrapper; int newEntry; - if (Tk_IsMapped(winPtr) && Tk_IsTopLevel(winPtr)) { + if (Tk_IsMapped(winPtr) && Tk_IsTopLevel(winPtr) && + !Tk_IsEmbedded(winPtr)) { wrapper = TkWinGetWrapperWindow((Tk_Window) winPtr); /*fprintf(stderr, "Mapped HWND %d to %x (%s)\n", wrapper, -- cgit v0.12