aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2017-10-18 20:13:59 +0200
committeremersion <contact@emersion.fr>2017-10-18 20:13:59 +0200
commita7d7659a930bb73ec34b00c492074fbf812377b2 (patch)
tree833f60be82249c2d129c0de48cb2433ba99acb78
parent8c5a110d4ca85f367a108e18968326ed4ff65ae6 (diff)
Fix render errors with gnome-terminal
-rw-r--r--types/wlr_output.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/types/wlr_output.c b/types/wlr_output.c
index 4c9814ef..eb969b9a 100644
--- a/types/wlr_output.c
+++ b/types/wlr_output.c
@@ -361,7 +361,9 @@ void wlr_output_swap_buffers(struct wlr_output *output) {
renderer = output->cursor.surface->renderer;
}
- if (texture && renderer) {
+ // We check texture->valid because some clients set a cursor surface
+ // with a NULL buffer to hide it
+ if (renderer && texture && texture->valid) {
float matrix[16];
wlr_texture_get_matrix(texture, &matrix, &output->transform_matrix,
output->cursor.x, output->cursor.y);