summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tkClipboard.c7
-rw-r--r--generic/ttk/ttkEntry.c6
2 files changed, 5 insertions, 8 deletions
diff --git a/generic/tkClipboard.c b/generic/tkClipboard.c
index e153064..043c167 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 = (Tk_Window) TkAllocWindow(dispPtr,
+ DefaultScreen(dispPtr->display), NULL);
Tcl_Preserve(dispPtr->clipWindow);
atts.override_redirect = True;
Tk_ChangeWindowAttributes(dispPtr->clipWindow, CWOverrideRedirect, &atts);
diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c
index 6eccf51..a3d0179 100644
--- a/generic/ttk/ttkEntry.c
+++ b/generic/ttk/ttkEntry.c
@@ -1225,10 +1225,10 @@ static void EntryDisplay(void *clientData, Drawable d)
* clipping area from the GC, so we have to supply that by other means.
*/
- rect.x = entryPtr->entry.layoutX;
- rect.y = entryPtr->entry.layoutY;
+ rect.x = textarea.x;
+ rect.y = textarea.y;
rect.width = textarea.width;
- rect.height = entryPtr->entry.layoutHeight;
+ rect.height = textarea.height;
clipRegion = TkCreateRegion();
TkUnionRectWithRegion(&rect, clipRegion, clipRegion);
#ifdef HAVE_XFT