wayland: Don't crash on cursor size 0

The cursor-theme-size setting is documented as
'0 means the default size'. Make it so by using
size 24 if we see a 0. Its better than crashing.

Fixes: #5700
This commit is contained in:
Matthias Clasen
2023-03-25 20:25:51 -04:00
parent 3c5b8be62e
commit c80d712d35

View File

@@ -1082,6 +1082,9 @@ gdk_wayland_display_set_cursor_theme (GdkDisplay *display,
g_assert (display_wayland);
g_assert (display_wayland->shm);
if (size == 0)
size = 24;
if (g_strcmp0 (name, display_wayland->cursor_theme_name) == 0 &&
display_wayland->cursor_theme_size == size)
return;