From: Consolatis <35009135+Consolatis@users.noreply.github.com> Date: Sat, 9 Aug 2025 02:48:39 +0000 (+0200) Subject: scaled-icon-buffer: prevent accidental downcasting of scale X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=32e308b5d512e501097d7ba5871345f0f7710917;p=proto%2Flabwc.git scaled-icon-buffer: prevent accidental downcasting of scale This causes blurry icons on non-integer scales and triggers an assert within cairo when using a output scale < 1. Fixes: #2983 --- diff --git a/src/common/scaled-icon-buffer.c b/src/common/scaled-icon-buffer.c index 62cb301e..49387bac 100644 --- a/src/common/scaled-icon-buffer.c +++ b/src/common/scaled-icon-buffer.c @@ -45,7 +45,7 @@ choose_best_icon_buffer(struct scaled_icon_buffer *self, int icon_size, double s } static struct lab_data_buffer * -img_to_buffer(struct lab_img *img, int width, int height, int scale) +img_to_buffer(struct lab_img *img, int width, int height, double scale) { struct lab_data_buffer *buffer = lab_img_render(img, width, height, scale); lab_img_destroy(img);