Output a warning when libwayland-cursor returns incorrectly sized cursor images

This commit is contained in:
Kovid Goyal 2022-05-23 12:50:47 +05:30
parent e7da874b82
commit 1b2d54d97a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

4
glfw/wl_init.c vendored
View File

@ -143,6 +143,10 @@ static void setCursor(GLFWCursorShape shape, _GLFWwindow* window)
if (!image)
return;
if (image->width % scale || image->height % scale) {
_glfwInputError(GLFW_PLATFORM_ERROR, "WARNING: Cursor image size: %dx%d is not a multiple of window scale: %d. This will"
" cause some compositors such as GNOME to crash. See https://github.com/kovidgoyal/kitty/issues/4878", image->width, image->height, scale);
}
buffer = wl_cursor_image_get_buffer(image);
if (!buffer)