diff options
author | Kirill Primak <vyivel@eclair.cafe> | 2022-11-05 13:34:29 +0300 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2022-11-05 14:44:57 +0300 |
commit | 92e3c5b7980890895ee6b882723c9b434c53b0c6 (patch) | |
tree | 914dd3346f77c1928775ec99769e733012b96af1 | |
parent | 3b75ab97e2c6429fad2ba4367e9252855564c4d2 (diff) |
scene: fix buffer source box transforming
-rw-r--r-- | types/scene/wlr_scene.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/types/scene/wlr_scene.c b/types/scene/wlr_scene.c index 69d6f4a3..c0be855d 100644 --- a/types/scene/wlr_scene.c +++ b/types/scene/wlr_scene.c @@ -613,16 +613,13 @@ void wlr_scene_buffer_set_buffer_with_damage(struct wlr_scene_buffer *scene_buff if (wlr_fbox_empty(&box)) { box.x = 0; box.y = 0; - - if (scene_buffer->transform & WL_OUTPUT_TRANSFORM_90) { - box.width = buffer->height; - box.height = buffer->width; - } else { - box.width = buffer->width; - box.height = buffer->height; - } + box.width = buffer->width; + box.height = buffer->height; } + wlr_fbox_transform(&box, &box, scene_buffer->transform, + buffer->width, buffer->height); + double scale_x, scale_y; if (scene_buffer->dst_width || scene_buffer->dst_height) { scale_x = scene_buffer->dst_width / box.width; |