summaryrefslogtreecommitdiff
path: root/gdk/gdkdraw.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2009-08-25 08:57:10 +0200
committerAlexander Larsson <alexl@redhat.com>2009-08-25 10:37:18 +0200
commit0ad0646dafed805a1fb7d8bed37301c1248a7591 (patch)
tree52b20a8538fa9acad26889addc64fe2f36c0f1f5 /gdk/gdkdraw.c
parent9e12297d692659b434feba491ddfc94a1632ee2b (diff)
downloadgtk+-0ad0646dafed805a1fb7d8bed37301c1248a7591.tar.gz
Fix clipping of drawn pixbufs in the no-render case
The fallback pixbuf rendering case ends up calling gdk_draw_image() on the destination drawable wrapper, which resets the previously set clip region. So, we need to manually get the impl and draw on that directly. This fixes bug 592752 where we don't clip pixbuf rendering on non-render Xservers.
Diffstat (limited to 'gdk/gdkdraw.c')
-rw-r--r--gdk/gdkdraw.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gdk/gdkdraw.c b/gdk/gdkdraw.c
index 8ab946479c..041d94e682 100644
--- a/gdk/gdkdraw.c
+++ b/gdk/gdkdraw.c
@@ -1638,12 +1638,14 @@ gdk_drawable_real_draw_pixbuf (GdkDrawable *drawable,
have already retargeted the destination to any
impl window and set the clip, so what we really
want to do is draw directly on the impl, ignoring
- client side subwindows. */
+ client side subwindows. We also use the impl
+ in the pixmap target case to avoid resetting the
+ already set clip on the GC. */
if (GDK_IS_WINDOW (drawable))
real_drawable = GDK_WINDOW_OBJECT (drawable)->impl;
else
- real_drawable = drawable;
-
+ real_drawable = GDK_PIXMAP_OBJECT (drawable)->impl;
+
if (pixbuf->has_alpha)
{
GdkVisual *visual = gdk_drawable_get_visual (drawable);