aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2017-10-11 08:38:32 +0200
committeremersion <contact@emersion.fr>2017-10-11 08:38:32 +0200
commit36b4465eb988621847bc8e83490e7a3b26ea34be (patch)
tree258473d3dcca4eb5976353d336b046636962ac32
parentab2f8d918b9dd8a4f5c06491fed3846ebeb5097a (diff)
Do not release buffer before emitting commit event
-rw-r--r--types/wlr_surface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/types/wlr_surface.c b/types/wlr_surface.c
index 9e38d701..1432c120 100644
--- a/types/wlr_surface.c
+++ b/types/wlr_surface.c
@@ -391,8 +391,6 @@ static void wlr_surface_flush_damage(struct wlr_surface *surface,
release:
pixman_region32_clear(&surface->current->surface_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) {
@@ -428,6 +426,8 @@ static void wlr_surface_commit_pending(struct wlr_surface *surface) {
// TODO: add the invalid bitfield to this callback
wl_signal_emit(&surface->events.commit, surface);
+
+ wlr_surface_state_release_buffer(surface->current);
}
static bool wlr_subsurface_is_synchronized(struct wlr_subsurface *subsurface) {