Do not release buffer before emitting commit event

This commit is contained in:
emersion 2017-10-11 08:38:32 +02:00
parent ab2f8d918b
commit 36b4465eb9
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48
1 changed files with 2 additions and 2 deletions

View File

@ -391,8 +391,6 @@ static void wlr_surface_flush_damage(struct wlr_surface *surface,
release: release:
pixman_region32_clear(&surface->current->surface_damage); pixman_region32_clear(&surface->current->surface_damage);
pixman_region32_clear(&surface->current->buffer_damage); pixman_region32_clear(&surface->current->buffer_damage);
wlr_surface_state_release_buffer(surface->current);
} }
static void wlr_surface_commit_pending(struct wlr_surface *surface) { static void wlr_surface_commit_pending(struct wlr_surface *surface) {
@ -428,6 +426,8 @@ static void wlr_surface_commit_pending(struct wlr_surface *surface) {
// TODO: add the invalid bitfield to this callback // TODO: add the invalid bitfield to this callback
wl_signal_emit(&surface->events.commit, surface); wl_signal_emit(&surface->events.commit, surface);
wlr_surface_state_release_buffer(surface->current);
} }
static bool wlr_subsurface_is_synchronized(struct wlr_subsurface *subsurface) { static bool wlr_subsurface_is_synchronized(struct wlr_subsurface *subsurface) {