aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--types/wlr_surface.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/types/wlr_surface.c b/types/wlr_surface.c
index 5d44c001..e9979bb1 100644
--- a/types/wlr_surface.c
+++ b/types/wlr_surface.c
@@ -327,11 +327,6 @@ static void surface_state_move(struct wlr_surface_state *state,
if (next->committed & WLR_SURFACE_STATE_BUFFER_DAMAGE) {
pixman_region32_clear(&next->buffer_damage);
}
- if (next->committed & WLR_SURFACE_STATE_FRAME_CALLBACK_LIST) {
- wl_list_insert_list(&state->frame_callback_list,
- &next->frame_callback_list);
- wl_list_init(&next->frame_callback_list);
- }
next->committed = 0;
next->cached_state_locks = 0;
@@ -501,6 +496,14 @@ static void surface_commit_pending(struct wlr_surface *surface) {
surface->role->precommit(surface);
}
+ // It doesn't to make sense to cache callback lists, so we always move
+ // them to the current state.
+ if (surface->pending.committed & WLR_SURFACE_STATE_FRAME_CALLBACK_LIST) {
+ wl_list_insert_list(&surface->current.frame_callback_list,
+ &surface->pending.frame_callback_list);
+ wl_list_init(&surface->pending.frame_callback_list);
+ }
+
if (surface->pending.cached_state_locks > 0 || !wl_list_empty(&surface->cached)) {
surface_cache_pending(surface);
} else {