[mutter] wayland: Fix caching of surface state
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland: Fix caching of surface state
- Date: Fri, 30 Jan 2015 04:21:02 +0000 (UTC)
commit 4d23e7c202f7db84c15f65555790ae46170fcc15
Author: Jonas Ådahl <jadahl gmail com>
Date: Thu Jan 29 15:43:01 2015 +0800
wayland: Fix caching of surface state
The commit 97a69cee5a12e11912b09f6617001a7da005f264 broke the caching of
the surface state when because the frame_callback_list target state was
overwritten after the content had been moved to it.
This commit fixes it by moving the frame list addition after the copy. We
also need to initialize the list since the plain copy put garbage in it.
https://bugzilla.gnome.org/show_bug.cgi?id=743678
src/wayland/meta-wayland-surface.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index 68fdb82..10a9555 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -296,10 +296,11 @@ move_pending_state (MetaWaylandPendingState *from,
if (from->buffer)
wl_list_remove (&from->buffer_destroy_listener.link);
- wl_list_insert_list (&to->frame_callback_list, &from->frame_callback_list);
-
*to = *from;
+ wl_list_init (&to->frame_callback_list);
+ wl_list_insert_list (&to->frame_callback_list, &from->frame_callback_list);
+
if (to->buffer)
wl_signal_add (&to->buffer->destroy_signal, &to->buffer_destroy_listener);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]