]> git.mdlowis.com Git - proto/labwc.git/commitdiff
xwayland: fix swapped width/height in _NET_WM_ICON stride calculation
authorJohn Lindgren <john@jlindgren.net>
Sun, 13 Jul 2025 01:10:59 +0000 (21:10 -0400)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Sun, 13 Jul 2025 01:51:40 +0000 (03:51 +0200)
Probably slipped through since most window icons are square anyway.

src/xwayland.c

index a648877ef5aac0f79bbff7782a69f585eab2ad8f..f156e0a3794272089265b95736818ab36b42d559 100644 (file)
@@ -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++) {