diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-09-11 19:00:46 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-09-11 19:00:46 (GMT) |
commit | 799666382d309825a9bd5d7205fd05662a742391 (patch) | |
tree | b86f5881527071f5af0f53ea442731fb4f9f592e /generic/ttk/ttkLabel.c | |
parent | 183d093ed0f015d721d963c7cff2f07f5a72af72 (diff) | |
download | tk-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/ttkLabel.c')
-rw-r--r-- | generic/ttk/ttkLabel.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/ttk/ttkLabel.c b/generic/ttk/ttkLabel.c index 6dd1a9e..55bf36d 100644 --- a/generic/ttk/ttkLabel.c +++ b/generic/ttk/ttkLabel.c @@ -161,8 +161,6 @@ static void TextDraw(TextElement *text, Tk_Window tkwin, Drawable d, Ttk_Box b) TkSetRegion(Tk_Display(tkwin), gc2, clipRegion); #ifdef HAVE_XFT TkUnixSetXftClipRegion(clipRegion); -#else - TkDestroyRegion(clipRegion); #endif } @@ -183,14 +181,16 @@ static void TextDraw(TextElement *text, Tk_Window tkwin, Drawable d, Ttk_Box b) text->textLayout, b.x, b.y, underline); } - Tk_FreeGC(Tk_Display(tkwin), gc1); - Tk_FreeGC(Tk_Display(tkwin), gc2); -#ifdef HAVE_XFT if (clipRegion != NULL) { +#ifdef HAVE_XFT TkUnixSetXftClipRegion(None); +#endif + TkSetRegion(Tk_Display(tkwin), gc1, None); + TkSetRegion(Tk_Display(tkwin), gc2, None); TkDestroyRegion(clipRegion); } -#endif + Tk_FreeGC(Tk_Display(tkwin), gc1); + Tk_FreeGC(Tk_Display(tkwin), gc2); } static void TextElementSize( |