From a9fd3ae249d090f9dc9e652a35cdc789d9908da7 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 22 Jan 2009 20:46:08 +0100 Subject: [PATCH] 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 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index cc0765d1fc..b63d8f6a43 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);