GNOME Bugzilla – Bug 780313
crashes when not using xcursor
Last modified: 2018-05-02 18:18:38 UTC
Created attachment 348326 [details] 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.
I suggest that we simply drop the configure option to build without xcursor.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/789.