aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-10-09 17:19:17 -0400
committerTony Crisci <tony@dubstepdish.com>2017-10-09 17:19:17 -0400
commit100b39c60820f9c1fa391eeb095e9bf355623b00 (patch)
tree15794ee5f1c28d78f7f7816b12e14d59984eaf1e
parentd0d6413772a09f385bc16f5fc38eda114695ee16 (diff)
bug: null buffer commit detection
-rw-r--r--types/wlr_surface.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/types/wlr_surface.c b/types/wlr_surface.c
index 3b4ff42c..b4f7b30f 100644
--- a/types/wlr_surface.c
+++ b/types/wlr_surface.c
@@ -347,8 +347,13 @@ static void wlr_surface_commit_pending(struct wlr_surface *surface) {
int32_t oldw = surface->current->buffer_width;
int32_t oldh = surface->current->buffer_height;
+ bool null_buffer_commit =
+ (surface->pending->invalid & WLR_SURFACE_INVALID_BUFFER &&
+ surface->pending->buffer == NULL);
+
wlr_surface_move_state(surface, surface->pending, surface->current);
- if (!surface->current->buffer) {
+
+ if (null_buffer_commit) {
surface->texture->valid = false;
}