From 890c34e8889317e09ba6b4a4c328e16b4712b9c7 Mon Sep 17 00:00:00 2001 From: mdejong Date: Mon, 24 Jun 2002 02:17:57 +0000 Subject: * tests/wm.test: Remove invalid minsize test. Add update calls to wm transient tests so that idle handlers get run. This is needed to get the tests to pass under Win32. * unix/tkUnixWm.c (WmWaitMapProc): Move the special transient withdrawn check into the if body to make it easier to set a breakpoint on this test inside a debugger. No functional changes. * win/tkWinWm.c (WmWaitVisibilityOrMapProc): Ditto. --- ChangeLog | 11 +++++++++++ tests/wm.test | 16 +++++++++------- unix/tkUnixWm.c | 8 ++++---- win/tkWinWm.c | 8 ++++---- 4 files changed, 28 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 097e2f9..40cdadd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2002-06-22 Mo DeJong + + * tests/wm.test: Remove invalid minsize test. Add update + calls to wm transient tests so that idle handlers get + run. This is needed to get the tests to pass under Win32. + * unix/tkUnixWm.c (WmWaitMapProc): Move the special + transient withdrawn check into the if body to + make it easier to set a breakpoint on this test + inside a debugger. No functional changes. + * win/tkWinWm.c (WmWaitVisibilityOrMapProc): Ditto. + 2002-06-22 Jeff Hobbs * doc/wm.n: TIP #95 Windows implementation and diff --git a/tests/wm.test b/tests/wm.test index c7dceed..d859fa6 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.11 2002/06/22 01:43:47 mdejong Exp $ +# RCS: @(#) $Id: wm.test,v 1.12 2002/06/24 02:17:57 mdejong Exp $ # This file tests window manager interactions that work across # platforms. Window manager tests that only work on a specific @@ -519,6 +519,8 @@ test wm-transient-6.1 { a withdrawn transient does not track wm withdraw .subject wm withdraw .master wm deiconify .master + # idle handler should not map the transient + update wm state .subject } {withdrawn} @@ -533,12 +535,16 @@ test wm-transient-6.2 { a withdrawn transient does not track wm withdraw .subject wm withdraw .master wm deiconify .master + # idle handler should not map the transient + update lappend results [wm state .subject] wm deiconify .subject lappend results [wm state .subject] wm withdraw .master lappend results [wm state .subject] wm deiconify .master + # idle handler should map transient + update lappend results [wm state .subject] } {withdrawn normal withdrawn normal} @@ -725,18 +731,14 @@ test wm-minsize-1.3 {usage} { } {1 {wrong # arguments: must be "wm minsize window ?width height?"}} test wm-minsize-1.4 {usage} { - wm minsize .t -} {1 1} - -test wm-minsize-1.5 {usage} { list [catch {wm minsize . x 100} msg] $msg } {1 {expected integer but got "x"}} -test wm-minsize-1.6 {usage} { +test wm-minsize-1.5 {usage} { list [catch {wm minsize . 100 bogus} msg] $msg } {1 {expected integer but got "bogus"}} -test wm-minsize-1.7 {usage} { +test wm-minsize-1.6 {usage} { wm minsize .t 200 150 wm minsize .t } {200 150} diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c index cfc1d1c..0de4103 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.25 2002/06/22 10:13:26 hobbs Exp $ + * RCS: @(#) $Id: tkUnixWm.c,v 1.26 2002/06/24 02:17:57 mdejong Exp $ */ #include "tkPort.h" @@ -2211,9 +2211,9 @@ WmWaitMapProc(clientData, eventPtr) if (masterPtr == NULL) return; - if (eventPtr->type == MapNotify && - !(winPtr->wmInfoPtr->flags & WM_TRANSIENT_WITHDRAWN)) { - (void) TkpWmSetState(winPtr, NormalState); + if (eventPtr->type == MapNotify) { + if (!(winPtr->wmInfoPtr->flags & WM_TRANSIENT_WITHDRAWN)) + (void) TkpWmSetState(winPtr, NormalState); } else if (eventPtr->type == UnmapNotify) { (void) TkpWmSetState(winPtr, WithdrawnState); } diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 5532c6e..376a42b 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.43 2002/06/22 10:13:26 hobbs Exp $ + * RCS: @(#) $Id: tkWinWm.c,v 1.44 2002/06/24 02:17:57 mdejong Exp $ */ #include "tkWinInt.h" @@ -3512,9 +3512,9 @@ WmWaitVisibilityOrMapProc(clientData, eventPtr) if (masterPtr == NULL) return; - if (eventPtr->type == MapNotify && - !(winPtr->wmInfoPtr->flags & WM_TRANSIENT_WITHDRAWN)) { - TkpWmSetState(winPtr, NormalState); + if (eventPtr->type == MapNotify) { + if (!(winPtr->wmInfoPtr->flags & WM_TRANSIENT_WITHDRAWN)) + TkpWmSetState(winPtr, NormalState); } else if (eventPtr->type == UnmapNotify) { TkpWmSetState(winPtr, WithdrawnState); } -- cgit v0.12