Closed Bug 1871863 Opened 1 year ago Closed 1 year ago

[GTK] Port from away from GdkCursorType to gdk_cursor_new_from_name

Categories

(Core :: Widget: Gtk, defect)

defect

Tracking

()

RESOLVED FIXED
123 Branch
Tracking Status
firefox123 --- fixed

People

(Reporter: jordan, Assigned: jordan)

References

(Regressed 4 open bugs)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0

Steps to reproduce:

adwaita-icon-theme, GNOME's and GTK's default icon theme dropped legacy X cursors recently [1] (expected to be released with GNOME 46) and thus, when running firefox some of the cursors are unable to be created and end up blank with a handful of gtk warnings.

The reason for this, is due to Firefox using the old GdkCursorType api which doesn't guarantee the cursors requested will exist. This is mostly legacy code from the gtk2 backend. gdk_cursor_new_from_name (from gtk3 and onwards) can create all the cursors firefox wants (and it's also using the same CSS3/4 conventions that firefox does intenrally). GdkCursorType has also been dropped in GTK 4 and this patch should help with porting the code too.

[1] https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/merge_requests/61

Actual results:

Dec 24 16:09:02 gnomeos firefox-bin[2863]: Unable to load left_ptr from the cursor theme
Dec 24 16:09:02 gnomeos firefox-bin[2863]: Unable to load xterm from the cursor theme
Dec 24 16:09:02 gnomeos firefox-bin[2863]: Unable to load left_ptr from the cursor theme
Dec 24 16:09:02 gnomeos firefox-bin[2863]: Unable to load left_ptr from the cursor theme
Dec 24 16:09:03 gnomeos firefox-bin[2863]: Unable to load xterm from the cursor theme

Expected results:

Cursor is working as usual

adwaita-icon-theme, GNOME's and GTK's default icon theme dropped
legacy X cursors recently [1] which is expected to be released with
GNOME 46. When running firefox now some of the cursors are unable to be
created and end up blank with a handful of gtk warnings.

The reason for this, is due to Firefox using the old GdkCursorType
api which doesn't guarantee the cursors requested will exist.
This is mostly legacy code from the gtk2 backend.
gdk_cursor_new_from_name (from gtk3 and onwards) can create all
the cursors firefox wants (and it's also using the same CSS3/4
conventions that firefox does intenrally).

GdkCursorType has also been dropped in GTK 4 and this patch should
help with porting the code too.

[1] https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/merge_requests/61

Assignee: nobody → jordan
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

I suppose we should backport this patch to ESR115?

Pushed by robert.mader@posteo.de: https://hg.mozilla.org/integration/autoland/rev/c71d09ab8b2b Port from GdkCursorType to gdk_cursor_new_from_name. r=rmader,stransky

Yea, will be nice to get it into ESR after it's tested for a bit

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 123 Branch
Regressions: 1872961
Regressions: 1873167
Regressions: 1876366
Regressions: 1881143
Regressions: 1880260
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: