[gtk+/gtk-2-24] Make gdk_flush_outstanding_moves "reentrant"
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24] Make gdk_flush_outstanding_moves "reentrant"
- Date: Wed, 10 Apr 2013 12:40:26 +0000 (UTC)
commit 4f2725630679966dd1148644105fd5592ac95ec8
Author: Alexander Larsson <alexl redhat com>
Date: Wed Apr 10 14:04:26 2013 +0200
Make gdk_flush_outstanding_moves "reentrant"
If the do_move_region_bits_on_impl causes updates they will
only be affected by the moves we haven't done yet.
We do this by making sure the outstanding_moves list is uptodate
on ever iteration of the loop.
gdk/gdkwindow.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index d20b424..6526250 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -3484,25 +3484,23 @@ gdk_window_flush_outstanding_moves (GdkWindow *window)
{
GdkWindowObject *private;
GdkWindowObject *impl_window;
- GList *l;
GdkWindowRegionMove *move;
private = (GdkWindowObject *) window;
impl_window = gdk_window_get_impl_window (private);
- for (l = impl_window->outstanding_moves; l != NULL; l = l->next)
+ while (impl_window->outstanding_moves)
{
- move = l->data;
+ move = impl_window->outstanding_moves->data;
+ impl_window->outstanding_moves = g_list_delete_link (impl_window->outstanding_moves,
+ impl_window->outstanding_moves);
do_move_region_bits_on_impl (impl_window,
move->dest_region, move->dx, move->dy);
gdk_window_region_move_free (move);
}
-
- g_list_free (impl_window->outstanding_moves);
- impl_window->outstanding_moves = NULL;
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]