From: John Lindgren Date: Sun, 13 Jul 2025 01:10:59 +0000 (-0400) Subject: xwayland: fix swapped width/height in _NET_WM_ICON stride calculation X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=bb2d34a5c12b2d4d6f30d0e9f4dd3cb8f110bfb6;p=proto%2Flabwc.git xwayland: fix swapped width/height in _NET_WM_ICON stride calculation Probably slipped through since most window icons are square anyway. --- 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++) {