summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkEntry.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-09-11 19:00:46 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-09-11 19:00:46 (GMT)
commit799666382d309825a9bd5d7205fd05662a742391 (patch)
treeb86f5881527071f5af0f53ea442731fb4f9f592e /generic/ttk/ttkEntry.c
parent183d093ed0f015d721d963c7cff2f07f5a72af72 (diff)
downloadtk-799666382d309825a9bd5d7205fd05662a742391.zip
tk-799666382d309825a9bd5d7205fd05662a742391.tar.gz
tk-799666382d309825a9bd5d7205fd05662a742391.tar.bz2
[Bug 3566594]: Fix clipping problem in classic X11; clip regions were leaking in
reused GCs.
Diffstat (limited to 'generic/ttk/ttkEntry.c')
-rw-r--r--generic/ttk/ttkEntry.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c
index a3d0179..22da65c 100644
--- a/generic/ttk/ttkEntry.c
+++ b/generic/ttk/ttkEntry.c
@@ -1254,6 +1254,7 @@ static void EntryDisplay(void *clientData, Drawable d)
gc = EntryGetGC(entryPtr, es.insertColorObj, clipRegion);
XFillRectangle(Tk_Display(tkwin), d, gc,
cursorX-cursorWidth/2, cursorY, cursorWidth, cursorHeight);
+ TkSetRegion(Tk_Display(tkwin), gc, None);
Tk_FreeGC(Tk_Display(tkwin), gc);
}
@@ -1264,6 +1265,7 @@ static void EntryDisplay(void *clientData, Drawable d)
Tk_Display(tkwin), d, gc, entryPtr->entry.textLayout,
entryPtr->entry.layoutX, entryPtr->entry.layoutY,
leftIndex, rightIndex);
+ TkSetRegion(Tk_Display(tkwin), gc, None);
Tk_FreeGC(Tk_Display(tkwin), gc);
/* Overwrite the selected portion (if any) in the -selectforeground color:
@@ -1274,6 +1276,7 @@ static void EntryDisplay(void *clientData, Drawable d)
Tk_Display(tkwin), d, gc, entryPtr->entry.textLayout,
entryPtr->entry.layoutX, entryPtr->entry.layoutY,
selFirst, selLast);
+ TkSetRegion(Tk_Display(tkwin), gc, None);
Tk_FreeGC(Tk_Display(tkwin), gc);
}