From 58aaed38ed048aeeafd044d607cb97b79039cd8f Mon Sep 17 00:00:00 2001 From: jenglish Date: Tue, 31 Jul 2012 05:07:14 +0000 Subject: Backport fix for [Bug 3546073] --- generic/tkClipboard.c | 7 ++----- unix/tkUnixSend.c | 8 +++----- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/generic/tkClipboard.c b/generic/tkClipboard.c index 8c37f09..e4d5c8e 100644 --- a/generic/tkClipboard.c +++ b/generic/tkClipboard.c @@ -655,11 +655,8 @@ TkClipInit(interp, dispPtr) * and set up an event handler for it. */ - dispPtr->clipWindow = Tk_CreateWindow(interp, (Tk_Window) NULL, - "_clip", DisplayString(dispPtr->display)); - if (dispPtr->clipWindow == NULL) { - return TCL_ERROR; - } + dispPtr->clipWindow = (Tk_Window) TkAllocWindow(dispPtr, + DefaultScreen(dispPtr->display), NULL); Tcl_Preserve((ClientData) dispPtr->clipWindow); atts.override_redirect = True; Tk_ChangeWindowAttributes(dispPtr->clipWindow, CWOverrideRedirect, &atts); diff --git a/unix/tkUnixSend.c b/unix/tkUnixSend.c index 2b54506..f6ad7b5 100644 --- a/unix/tkUnixSend.c +++ b/unix/tkUnixSend.c @@ -1314,11 +1314,9 @@ SendInit(interp, dispPtr) * event handler for it. */ - dispPtr->commTkwin = Tk_CreateWindow(interp, (Tk_Window) NULL, - "_comm", DisplayString(dispPtr->display)); - if (dispPtr->commTkwin == NULL) { - panic("Tk_CreateWindow failed in SendInit!"); - } + dispPtr->commTkwin = (Tk_Window) TkAllocWindow(dispPtr, + DefaultScreen(dispPtr->display), NULL); + Tcl_Preserve((ClientData) dispPtr->commTkwin); atts.override_redirect = True; Tk_ChangeWindowAttributes(dispPtr->commTkwin, -- cgit v0.12