diff options
author | dgp <dgp@users.sourceforge.net> | 2012-09-15 00:33:30 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2012-09-15 00:33:30 (GMT) |
commit | 01237b49dd758458dee4134e4c78b2696035cfe9 (patch) | |
tree | 8fb424eb90013d0c80b0d4ce801008c584e0f27b | |
parent | e829dc68c26b7b313b94f777def7bb49c471422b (diff) | |
download | tk-01237b49dd758458dee4134e4c78b2696035cfe9.zip tk-01237b49dd758458dee4134e4c78b2696035cfe9.tar.gz tk-01237b49dd758458dee4134e4c78b2696035cfe9.tar.bz2 |
3567812 3567779 Repaired regressions in 3546073 fix.
Stopped test event leakage in winWm-9.2.
-rw-r--r-- | generic/tkClipboard.c | 3 | ||||
-rw-r--r-- | tests/winWm.test | 23 | ||||
-rw-r--r-- | unix/tkUnixSend.c | 3 |
3 files changed, 19 insertions, 10 deletions
diff --git a/generic/tkClipboard.c b/generic/tkClipboard.c index 604fa98..b902625 100644 --- a/generic/tkClipboard.c +++ b/generic/tkClipboard.c @@ -652,6 +652,9 @@ TkClipInit( dispPtr->clipWindow = (Tk_Window) TkAllocWindow(dispPtr, DefaultScreen(dispPtr->display), NULL); Tcl_Preserve(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 a4d2669..ad4988d 100644 --- a/tests/winWm.test +++ b/tests/winWm.test @@ -541,25 +541,28 @@ test winWm-9.2 "check wm forget for unmapped parent (#3205464,#2967911)" -setup } -body { 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 - unset -nocomplain winwm92 aid + unset -nocomplain winwm92 aid id } -result ok destroy .t diff --git a/unix/tkUnixSend.c b/unix/tkUnixSend.c index 54c3cf2..87a1113 100644 --- a/unix/tkUnixSend.c +++ b/unix/tkUnixSend.c @@ -1360,6 +1360,9 @@ SendInit( dispPtr->commTkwin = (Tk_Window) TkAllocWindow(dispPtr, DefaultScreen(dispPtr->display), NULL); Tcl_Preserve(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); |