From f338af1cc9d9a0a21ec6242beb04bbb506ee0995 Mon Sep 17 00:00:00 2001 From: John Lindgren Date: Sat, 12 Jul 2025 21:10:59 -0400 Subject: [PATCH] xwayland: fix swapped width/height in _NET_WM_ICON stride calculation Probably slipped through since most window icons are square anyway. --- src/xwayland.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xwayland.c b/src/xwayland.c index a648877e..f156e0a3 100644 --- a/src/xwayland.c +++ b/src/xwayland.c @@ -624,8 +624,8 @@ update_icon(struct xwayland_view *xwayland_view) struct wl_array buffers; wl_array_init(&buffers); for (; iter.rem; xcb_ewmh_get_wm_icon_next(&iter)) { - size_t stride = iter.height * 4; - uint32_t *buf = xzalloc(iter.width * stride); + size_t stride = iter.width * 4; + uint32_t *buf = xzalloc(iter.height * stride); /* Pre-multiply alpha */ for (uint32_t y = 0; y < iter.height; y++) {