mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-03-22 05:34:24 -04:00
cursor: Unset cursor if texture upload failed
We need to make sure cursor_output_cursor_update() will clear the old texture references through all code paths.
This commit is contained in:
parent
7ef2c0a506
commit
c044aef5f0
1 changed files with 8 additions and 10 deletions
|
|
@ -505,17 +505,15 @@ static void cursor_output_cursor_update(struct wlr_cursor_output_cursor *output_
|
||||||
int dst_width = 0, dst_height = 0;
|
int dst_width = 0, dst_height = 0;
|
||||||
if (buffer != NULL) {
|
if (buffer != NULL) {
|
||||||
texture = wlr_texture_from_buffer(renderer, buffer);
|
texture = wlr_texture_from_buffer(renderer, buffer);
|
||||||
if (texture == NULL) {
|
if (texture) {
|
||||||
return;
|
src_box = (struct wlr_fbox){
|
||||||
|
.width = texture->width,
|
||||||
|
.height = texture->height,
|
||||||
|
};
|
||||||
|
|
||||||
|
dst_width = texture->width / scale;
|
||||||
|
dst_height = texture->height / scale;
|
||||||
}
|
}
|
||||||
|
|
||||||
src_box = (struct wlr_fbox){
|
|
||||||
.width = texture->width,
|
|
||||||
.height = texture->height,
|
|
||||||
};
|
|
||||||
|
|
||||||
dst_width = texture->width / scale;
|
|
||||||
dst_height = texture->height / scale;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
output_cursor_set_texture(output_cursor->output_cursor, texture, true,
|
output_cursor_set_texture(output_cursor->output_cursor, texture, true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue