From 272139f34f99a593e9684400ffc947509a6c2feb Mon Sep 17 00:00:00 2001 From: Zedhugh Chen Date: Tue, 28 Jul 2026 05:32:50 +0800 Subject: [PATCH] =?UTF-8?q?fix(tray):=20=E4=BF=AE=E6=AD=A3=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E8=87=AA=E7=84=B6=E5=B0=BA=E5=AF=B8=E4=B8=BA=20int32?= =?UTF-8?q?=5Ft=20=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/x11/tray.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/backend/x11/tray.c b/src/backend/x11/tray.c index 5277af9..f1eef4a 100644 --- a/src/backend/x11/tray.c +++ b/src/backend/x11/tray.c @@ -32,8 +32,8 @@ static constexpr auto XEMBED_VERSION = 0; typedef struct tray_icon_t { xcb_window_t window; - uint16_t natural_width; - uint16_t natural_height; + int32_t natural_width; + int32_t natural_height; } tray_icon_t; typedef struct tray_host_t { @@ -127,8 +127,8 @@ static zdwm_size_t tray_get_icon_size(tray_host_t *tray, size_t index) { double height_scale = (double)target_size / (double)natural_height; auto scale = MIN(width_scale, height_scale); zdwm_size_t size = { - .width = natural_width * scale, - .height = natural_height * scale, + .width = (int32_t)(natural_width * scale), + .height = (int32_t)(natural_height * scale), }; return size; } @@ -465,7 +465,7 @@ static void tray_add_icon(backend_t *backend, xcb_window_t window) { *icon = (tray_icon_t){ .window = window, .natural_width = geometry.width, - .natural_height = geometry.height + .natural_height = geometry.height, }; auto conn = backend->conn;