crashes when not using xcursor
Submitted by Nicolas Setton
Link to original bug (#780313)
Description
Created attachment 348326 proposed fix (against gtk 3.22.x)
A lot of the Gtk+ code now does something like (example from gtk/gtkentry.c):
cursor = gdk_cursor_new_from_name (gdk_window_get_display (window), "none"); gdk_window_set_cursor (window, cursor); g_object_unref (cursor);
This assumes that gdk_cursor_new_from_name will return an object. But this is not the case with the X11 backend when gtk+ is configured without xcursor, where the code does (gdk/x11/gdkcursor-x11.c):
GdkCursor* _gdk_x11_display_get_cursor_for_name (GdkDisplay *display, const gchar *name) { return NULL; }
And this results in crashes at runtime. The patch attached fixes this by providing a fallback mechanism that makes the non-xcursor version of _gdk_x11_display_get_cursor_for_name return a cursor.
Attachment 348326, "proposed fix (against gtk 3.22.x)":
provide_cursors_without_xcursor.patch
Version: 3.22.x