Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gtk gtk
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,433
    • Issues 1,433
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 246
    • Merge requests 246
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOME
  • gtkgtk
  • Issues
  • #789

Closed
Open
Created Mar 20, 2017 by Bugzilla@bugzilla-migration💬Reporter

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

Assignee
Assign to
Time tracking