[gtk+/client-side-windows: 160/284] Flush any outstanding stuff in the window in non-buffered get_internal_paint_info case



commit a9fd3ae249d090f9dc9e652a35cdc789d9908da7
Author: Alexander Larsson <alex localhost localdomain>
Date:   Thu Jan 22 20:46:08 2009 +0100

    Flush any outstanding stuff in the window in non-buffered get_internal_paint_info case
    
    We return the raw window drawable, so its likely the app will do some
    weird stuff to it, like draw using non-gdk operations. We don't want
    the app to see any half-drawn state, so flush everything.
    
    This fixes a scroll issue in firefox at least.
---
 gdk/gdkwindow.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index cc0765d..b63d8f6 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -2716,7 +2716,12 @@ gdk_window_get_internal_paint_info (GdkWindow    *window,
 	  *real_drawable = paint->pixmap;
 	}
       else
-	*real_drawable = window;
+	{
+	  /* This means you're probably gonna be doing some weird shit
+	     directly to the window, so we flush all outstanding stuff */
+	  gdk_window_flush (window);
+	  *real_drawable = window;
+	}
     }
 
   gdk_window_get_offsets (window, &x_off, &y_off);



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