Commit 692a0e59 authored by Alexander Larsson's avatar Alexander Larsson
Browse files

gdkwindow: Handle updates created by outstanding moves in same update

If gdk_window_flush_outstanding_moves() creates new update area
we handle this directly in the same draw to avoid flashing.

This mainly affects win32 as X11 does its exposes from moves async.
However, its important for win32 since ScrollDC seems to sometimes
invalidate (and not copy) unexected regions.
parent ea66a8a5
......@@ -5463,6 +5463,7 @@ gdk_window_process_updates_internal (GdkWindow *window)
GdkWindowImplIface *impl_iface;
gboolean save_region = FALSE;
GdkRectangle clip_box;
int iteration;
/* Ensure the window lives while updating it */
g_object_ref (window);
......@@ -5470,8 +5471,15 @@ gdk_window_process_updates_internal (GdkWindow *window)
/* If an update got queued during update processing, we can get a
* window in the update queue that has an empty update_area.
* just ignore it.
* We run this multiple times if needed because on win32 the
* first run can cause new (synchronous) updates from
* gdk_window_flush_outstanding_moves(). However, we
* limit it to two iterations to avoid any potential loops.
if (private->update_area)
iteration = 0;
while (private->update_area &&
iteration++ < 2)
GdkRegion *update_area = private->update_area;
private->update_area = NULL;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment