diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-09-13 20:49:44 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-09-13 20:49:44 (GMT) |
commit | 7a077bb388d8dcc2295b508e936e3d9eb7f4e57a (patch) | |
tree | 04a7b96bfe837ae870d19ef78eec77aed860b817 /generic/ttk | |
parent | 01dc2559dada42bd2c0f7c5c91f2f3403146bfa8 (diff) | |
parent | c9097c70173e25b097adfd1b44b2d2ab360ab1be (diff) | |
download | tk-7a077bb388d8dcc2295b508e936e3d9eb7f4e57a.zip tk-7a077bb388d8dcc2295b508e936e3d9eb7f4e57a.tar.gz tk-7a077bb388d8dcc2295b508e936e3d9eb7f4e57a.tar.bz2 |
[Bug 3567453]: Clip regions must be cleared with XSetClipMask and not
TkSetRegion on X11.
Diffstat (limited to 'generic/ttk')
-rw-r--r-- | generic/ttk/ttkEntry.c | 10 | ||||
-rw-r--r-- | generic/ttk/ttkLabel.c | 4 |
2 files changed, 8 insertions, 6 deletions
diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c index 5ef7f81..a962662 100644 --- a/generic/ttk/ttkEntry.c +++ b/generic/ttk/ttkEntry.c @@ -1151,7 +1151,9 @@ static GC EntryGetGC(Entry *entryPtr, Tcl_Obj *colorObj, TkRegion clip) mask |= GCForeground; } gc = Tk_GetGC(entryPtr->core.tkwin, mask, &gcValues); - TkSetRegion(Tk_Display(entryPtr->core.tkwin), gc, clip); + if (clip != None) { + TkSetRegion(Tk_Display(entryPtr->core.tkwin), gc, clip); + } return gc; } @@ -1254,7 +1256,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); + XSetClipMask(Tk_Display(tkwin), gc, None); Tk_FreeGC(Tk_Display(tkwin), gc); } @@ -1265,7 +1267,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); + XSetClipMask(Tk_Display(tkwin), gc, None); Tk_FreeGC(Tk_Display(tkwin), gc); /* Overwrite the selected portion (if any) in the -selectforeground color: @@ -1276,7 +1278,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); + XSetClipMask(Tk_Display(tkwin), gc, None); Tk_FreeGC(Tk_Display(tkwin), gc); } diff --git a/generic/ttk/ttkLabel.c b/generic/ttk/ttkLabel.c index 0f554a6..0f71970 100644 --- a/generic/ttk/ttkLabel.c +++ b/generic/ttk/ttkLabel.c @@ -185,8 +185,8 @@ static void TextDraw(TextElement *text, Tk_Window tkwin, Drawable d, Ttk_Box b) #ifdef HAVE_XFT TkUnixSetXftClipRegion(None); #endif - TkSetRegion(Tk_Display(tkwin), gc1, None); - TkSetRegion(Tk_Display(tkwin), gc2, None); + XSetClipMask(Tk_Display(tkwin), gc1, None); + XSetClipMask(Tk_Display(tkwin), gc2, None); TkDestroyRegion(clipRegion); } Tk_FreeGC(Tk_Display(tkwin), gc1); |