mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 04:45:58 +01:00
wlr_scene: Call surface enter scale events on surface create
We would fail to call scene_node_update() which would then call output events for us. We need to make sure to update the node when we first map a buffer, as the comment explained.
This commit is contained in:
parent
50eae512d9
commit
2d97935e82
1 changed files with 7 additions and 7 deletions
|
@ -667,21 +667,21 @@ void wlr_scene_buffer_set_buffer_with_damage(struct wlr_scene_buffer *scene_buff
|
|||
assert(buffer || !damage);
|
||||
|
||||
bool update = false;
|
||||
|
||||
wlr_texture_destroy(scene_buffer->texture);
|
||||
scene_buffer->texture = NULL;
|
||||
|
||||
if (buffer) {
|
||||
// if this node used to not be mapped or its previous displayed
|
||||
// buffer region will be different from what the new buffer would
|
||||
// produce we need to update the node.
|
||||
update = scene_buffer->dst_width == 0 && scene_buffer->dst_height == 0 &&
|
||||
(scene_buffer->buffer_width != buffer->width ||
|
||||
scene_buffer->buffer_height != buffer->height);
|
||||
update = (!scene_buffer->buffer && !scene_buffer->texture) ||
|
||||
(scene_buffer->dst_width == 0 && scene_buffer->dst_height == 0 &&
|
||||
(scene_buffer->buffer_width != buffer->width ||
|
||||
scene_buffer->buffer_height != buffer->height));
|
||||
} else {
|
||||
update = true;
|
||||
}
|
||||
|
||||
wlr_texture_destroy(scene_buffer->texture);
|
||||
scene_buffer->texture = NULL;
|
||||
|
||||
scene_buffer_set_buffer(scene_buffer, buffer);
|
||||
|
||||
if (update) {
|
||||
|
|
Loading…
Reference in a new issue