summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tkClipboard.c2
-rw-r--r--tests/winWm.test23
-rw-r--r--unix/tkUnixSend.c2
3 files changed, 17 insertions, 10 deletions
diff --git a/generic/tkClipboard.c b/generic/tkClipboard.c
index 09e600a..c6748a1 100644
--- a/generic/tkClipboard.c
+++ b/generic/tkClipboard.c
@@ -648,6 +648,8 @@ TkClipInit(
dispPtr->clipWindow = (Tk_Window) TkAllocWindow(dispPtr,
DefaultScreen(dispPtr->display), NULL);
Tcl_Preserve((ClientData) dispPtr->clipWindow);
+ ((TkWindow *) dispPtr->clipWindow)->flags |= TK_TOP_HIERARCHY|TK_TOP_LEVEL|TK_HAS_WRAPPER|TK_WIN_MANAGED;
+ TkWmNewWindow((TkWindow *) dispPtr->clipWindow);
atts.override_redirect = True;
Tk_ChangeWindowAttributes(dispPtr->clipWindow, CWOverrideRedirect, &atts);
Tk_MakeWindowExist(dispPtr->clipWindow);
diff --git a/tests/winWm.test b/tests/winWm.test
index 2864418..933d09e 100644
--- a/tests/winWm.test
+++ b/tests/winWm.test
@@ -465,23 +465,26 @@ test winWm-9.2 "check wm forget for unmapped parent (#3205464,#2967911)" -setup
frame .t.f -background blue -height 200 -width 200
frame .t.f.x -background red -height 100 -width 100
} -body {
- pack .t.f.x
+ pack .t.f.x
pack .t.f
- set aid [after 1000 {set ::winwm92 timeout}]
- after 100 {
+ lappend aid [after 2000 {set ::winwm92 timeout}] [after 100 {
wm manage .t.f
wm iconify .t
- after 100 {
+ lappend aid [after 100 {
wm forget .t.f
wm deiconify .t
- after 100 {
+ lappend aid [after 100 {
pack .t.f
- after 100 {set ::winwm92 [expr {[winfo rooty .t.f.x] == 0 ? "failed" : "ok"}]}
- }
- }
- }
+ lappend aid [after 100 {
+ set ::winwm92 [expr {
+ [winfo rooty .t.f.x] == 0 ? "failed" : "ok"}]}]
+ }]
+ }]
+ }]
vwait ::winwm92
- after cancel $aid
+ foreach id $aid {
+ after cancel $id
+ }
set winwm92
} -cleanup {
destroy .t.f.x .t.f .t
diff --git a/unix/tkUnixSend.c b/unix/tkUnixSend.c
index f376d79..048fb88 100644
--- a/unix/tkUnixSend.c
+++ b/unix/tkUnixSend.c
@@ -1353,6 +1353,8 @@ SendInit(
dispPtr->commTkwin = (Tk_Window) TkAllocWindow(dispPtr,
DefaultScreen(dispPtr->display), NULL);
Tcl_Preserve((ClientData) dispPtr->commTkwin);
+ ((TkWindow *) dispPtr->commTkwin)->flags |=TK_TOP_HIERARCHY|TK_TOP_LEVEL|TK_HAS_WRAPPER|TK_WIN_MANAGED;
+ TkWmNewWindow((TkWindow *) dispPtr->commTkWin);
atts.override_redirect = True;
Tk_ChangeWindowAttributes(dispPtr->commTkwin,
CWOverrideRedirect, &atts);