After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 780313 - crashes when not using xcursor
crashes when not using xcursor
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Backend: X11
3.22.x
Other Linux
: Normal critical
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-03-20 15:29 UTC by Nicolas Setton
Modified: 2018-05-02 18:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed fix (against gtk 3.22.x) (2.44 KB, text/plain)
2017-03-20 15:29 UTC, Nicolas Setton
Details

Description Nicolas Setton 2017-03-20 15:29:44 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.
Comment 1 Matthias Clasen 2017-03-26 09:08:01 UTC
I suggest that we simply drop the configure option to build without xcursor.
Comment 2 GNOME Infrastructure Team 2018-05-02 18:18:38 UTC
-- 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.