diff options
author | treectrl <treectrl> | 2005-07-07 03:18:57 (GMT) |
---|---|---|
committer | treectrl <treectrl> | 2005-07-07 03:18:57 (GMT) |
commit | 7aa46a49a80c4e090566fb9244f8809a290c4dc9 (patch) | |
tree | 16f9a66052df46e5d21cf6924a769c208f79dace /generic | |
parent | f0a19ef372b96f4fbc034f0f962c06063996a8bc (diff) | |
download | tktreectrl-7aa46a49a80c4e090566fb9244f8809a290c4dc9.zip tktreectrl-7aa46a49a80c4e090566fb9244f8809a290c4dc9.tar.gz tktreectrl-7aa46a49a80c4e090566fb9244f8809a290c4dc9.tar.bz2 |
UnsetClipMask works around Tk_DrawChars not clearing the clip region on Win32.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkTreeUtils.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/generic/tkTreeUtils.c b/generic/tkTreeUtils.c index e2c9ce0..fe539a5 100644 --- a/generic/tkTreeUtils.c +++ b/generic/tkTreeUtils.c @@ -5,7 +5,7 @@ * * Copyright (c) 2002-2005 Tim Baker * - * RCS: @(#) $Id: tkTreeUtils.c,v 1.29 2005/06/18 01:52:38 treectrl Exp $ + * RCS: @(#) $Id: tkTreeUtils.c,v 1.30 2005/07/07 03:18:57 treectrl Exp $ */ #include "tkTreeCtrl.h" @@ -613,6 +613,22 @@ int Tree_ScrollWindow(TreeCtrl *tree, GC gc, int x, int y, return result; } +void UnsetClipMask(TreeCtrl *tree, Drawable drawable, GC gc) +{ + XSetClipMask(tree->display, gc, None); +#ifdef WIN32 + /* Tk_DrawChars does not clear the clip region */ + if (drawable == Tk_WindowId(tree->tkwin)) { + HDC dc; + TkWinDCState dcState; + + dc = TkWinGetDrawableDC(tree->display, drawable, &dcState); + SelectClipRgn(dc, NULL); + TkWinReleaseDrawableDC(drawable, dc, &dcState); + } +#endif +} + void Tree_DrawBitmapWithGC(TreeCtrl *tree, Pixmap bitmap, Drawable drawable, GC gc, int src_x, int src_y, int width, int height, int dest_x, int dest_y) { |