diff options
author | jenglish <jenglish@noemail.net> | 2012-07-23 23:12:05 (GMT) |
---|---|---|
committer | jenglish <jenglish@noemail.net> | 2012-07-23 23:12:05 (GMT) |
commit | 94b98a04d664b5cea934bde313c194bd87c9e513 (patch) | |
tree | 69d870ad292b6b0ea514886aaeefbff76c7110d6 | |
parent | 5bb0dc20c7c24b202644c738919a3a5a5f561b64 (diff) | |
parent | 7f0b0f7d4ba38a69be102e43cc1b506055318a75 (diff) | |
download | tk-94b98a04d664b5cea934bde313c194bd87c9e513.zip tk-94b98a04d664b5cea934bde313c194bd87c9e513.tar.gz tk-94b98a04d664b5cea934bde313c194bd87c9e513.tar.bz2 |
Fix for [Bug 3546073]:
Replace Tk_CreateWindow(... DisplayString(dispPtr->display)) with
direct call to TkAllocWindow().
FossilOrigin-Name: d0bbba65a5b061f6fb5b6de6b659cb6f141a167c
-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 e153064..3687033 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, NULL, "_clip", - DisplayString(dispPtr->display)); - if (dispPtr->clipWindow == NULL) { - return TCL_ERROR; - } + dispPtr->clipWindow = TkAllocWindow(dispPtr, + DefaultScreen(dispPtr->display), NULL); Tcl_Preserve(dispPtr->clipWindow); atts.override_redirect = True; Tk_ChangeWindowAttributes(dispPtr->clipWindow, CWOverrideRedirect, &atts); diff --git a/unix/tkUnixSend.c b/unix/tkUnixSend.c index be53ec6..37b1737 100644 --- a/unix/tkUnixSend.c +++ b/unix/tkUnixSend.c @@ -1349,11 +1349,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(dispPtr->commTkwin); atts.override_redirect = True; Tk_ChangeWindowAttributes(dispPtr->commTkwin, |