Etaash Mathamsetty (@etaash.mathamsetty) commented about dlls/winewayland.drv/wayland_surface.c:
BITMAPINFO *info = (BITMAPINFO *)buffer; BITMAP bm; - unsigned int *ptr, *bits = NULL; + unsigned int *ptr, *bits = NULL, *non_square_bits; unsigned char *mask_bits = NULL; - int i, j; + int i, j, square_length; BOOL has_alpha = FALSE;
if (!NtGdiExtGetObjectW(color, sizeof(bm), &bm)) goto failed;
- shm_buffer = wayland_shm_buffer_create(bm.bmWidth, bm.bmHeight, + /* Make the buffer square - length is the larger side */ + square_length = (bm.bmWidth > bm.bmHeight) ? bm.bmWidth : bm.bmHeight; + + shm_buffer = wayland_shm_buffer_create(square_length, square_length,
This would also need a check for if we want to create a square or not. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9868#note_126664