diff options
-rw-r--r-- | generic/tkClipboard.c | 7 | ||||
-rw-r--r-- | unix/tkUnixSend.c | 7 |
2 files changed, 4 insertions, 10 deletions
diff --git a/generic/tkClipboard.c b/generic/tkClipboard.c index 9428894..168171b 100644 --- a/generic/tkClipboard.c +++ b/generic/tkClipboard.c @@ -645,11 +645,8 @@ TkClipInit( * 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 = 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 c073309..493100e 100644 --- a/unix/tkUnixSend.c +++ b/unix/tkUnixSend.c @@ -1350,11 +1350,8 @@ SendInit( * for it. */ - dispPtr->commTkwin = Tk_CreateWindow(interp, (Tk_Window) NULL, - "_comm", DisplayString(dispPtr->display)); - if (dispPtr->commTkwin == NULL) { - Tcl_Panic("Tk_CreateWindow failed in SendInit!"); - } + dispPtr->commTkwin = TkAllocWindow(dispPtr, + DefaultScreen(dispPtr->display), NULL); Tcl_Preserve((ClientData) dispPtr->commTkwin); atts.override_redirect = True; Tk_ChangeWindowAttributes(dispPtr->commTkwin, |