summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--tests/wm.test16
-rw-r--r--unix/tkUnixWm.c8
-rw-r--r--win/tkWinWm.c8
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 <mdejong@users.sourceforge.net>
+
+ * 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 <jeffh@ActiveState.com>
* 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);
}