[gtk+/client-side-windows: 28/284] Fix draw_drawable being offset when using window as source (testgtk text test)



commit b6e84d3105a1195cacdbfccf4a3d61e52a799940
Author: Alexander Larsson <alexl redhat com>
Date:   Fri Dec 5 19:24:55 2008 +0100

    Fix draw_drawable being offset when using window as source (testgtk text test)
---
 gdk/gdkwindow.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index ea5642f..4c01723 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -2764,6 +2764,13 @@ gdk_window_draw_drawable (GdkDrawable *drawable,
   if (GDK_WINDOW_DESTROYED (drawable))
     return;
 
+  /* By this time the src has been gotten via get_composite_drawable.
+     If it is a window this implies lots of stuff that we don't want
+     to do again in the call below. So, we use the impl as the source to
+     avoid this. */
+  if (GDK_IS_WINDOW (src))
+    src = GDK_WINDOW_OBJECT (src)->impl;
+  
   /* If we have a backing pixmap draw to that */
   if (private->paint_stack)
     {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]