Etaash Mathamsetty (@etaash.mathamsetty) commented about dlls/winewayland.drv/wayland_surface.c:
- if (!NtGdiGetDIBitsInternal(hdc, color, 0, bm.bmHeight, bits, info, - DIB_RGB_COLORS, 0, 0)) - goto failed; + if (force_square && bm.bmWidth != bm.bmHeight) + { + if (!(non_square_bits = malloc(info->bmiHeader.biSizeImage))) goto failed; + + if (!NtGdiGetDIBitsInternal(hdc, color, 0, square_length, non_square_bits, info, + DIB_RGB_COLORS, 0, 0)) + { + free(non_square_bits); + goto failed; + } + + copy_rectangle_into_center_of_square(non_square_bits, bm.bmWidth, bm.bmHeight, square_length, bits);
This line is probably too long -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9868#note_127215