Open Bug 1832023 Opened 3 years ago Updated 2 years ago

[XFCE] zoom-in/zoom-out cursor is not displayed in Firefox on Ubuntu 22.04

Categories

(Core :: Widget: Gtk, defect, P3)

Firefox 112
defect

Tracking

()

UNCONFIRMED

People

(Reporter: andrejusc, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36

Steps to reproduce:

navigator.userAgent:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/112.0
OS: Ubuntu 22.04.2 LTS

Steps to reproduce:

  1. Open this page in Firefox: https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#try_it
  2. Try initially click on 'cursor: help;' item and observe on right side mouse cursor properly changing to question mark
  3. Try then click on 'cursor: zoom-in' item and observe that mouse cursor stays same as left arrow.

Actual results:

Mouse cursor stays same left arrow

Expected results:

Mouse cursor should change to magnifier icon

Note - on Windows 11 with Firefox and such user agent:
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0"
it works for me. So looks to be Ubuntu specific.

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
Flags: needinfo?(andrejusc)
Priority: -- → P3

I've downloaded from binaries such: firefox-113.0.tar.bz2
It got me such when launched:
navigator.userAgent
"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0"

Then I've tried such 2 ways as stated in Troubleshooting and selecting 'default-release' as profile:
MOZ_ENABLE_WAYLAND=0 ./firefox -ProfileManager -no-remote
and with enabled:
MOZ_ENABLE_WAYLAND=1 ./firefox -ProfileManager -no-remote

but so far same as original issue. Any other startup option/setting to try?

Flags: needinfo?(andrejusc)

I can't reproduce. Is the cursor broken even if you enter 'zoom-in' first? Does 'zoom-in' cursor even work?

Flags: needinfo?(andrejusc)

Yes, it's broken if I enter 'zoom-in' fist on that mentioned page: https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#try_it

In the past there was such related bug raised: https://bugzilla.mozilla.org/show_bug.cgi?id=1233868, where it was talking about some GTK aspects and some cursor retrieval logic by name or similar. Not sure if that is related here in my case.

If trying 'about:support' for downloaded binary Firefox - it presents 'xfce' as Desktop Environment. If such could be of any value to troubleshoot here.

I see, so it may be related to your desktop environment (XFCE).

Summary: zoom-in/zoom-out cursor is not displayed in Firefox on Ubuntu 22.04 → [XFCE] zoom-in/zoom-out cursor is not displayed in Firefox on Ubuntu 22.04

I've tried to use now such for extra debugging:
G_MESSAGES_DEBUG=all ./firefox

but such doesn't reveal anything specific related to cursor handling. Only could see multiple calls reported for gtk_style_context_set_state ()

Flags: needinfo?(andrejusc)

If of any other use - have such gtk related libs on my box:

libgtk-3-0/jammy-updates,now 3.24.33-1ubuntu2 amd64 [installed,automatic]
libgtk-3-bin/jammy-updates,now 3.24.33-1ubuntu2 amd64 [installed,automatic]
libgtk-3-common/jammy-updates,jammy-updates,now 3.24.33-1ubuntu2 all [installed,automatic]
libgtk2.0-0/jammy,now 2.24.33-2ubuntu2 amd64 [installed,automatic]
libgtk2.0-bin/jammy,now 2.24.33-2ubuntu2 amd64 [installed,automatic]
libgtk2.0-common/jammy,jammy,now 2.24.33-2ubuntu2 all [installed,automatic]
libgtk3-perl/jammy,jammy,now 0.038-1 all [installed,automatic]
libgtkmm-3.0-1v5/jammy,now 3.24.5-1build1 amd64 [installed,automatic]
libgtksourceview-4-0/jammy,now 4.8.3-1 amd64 [installed,automatic]
libgtksourceview-4-common/jammy,jammy,now 4.8.3-1 all [installed,automatic]
libjavascriptcoregtk-4.0-18/jammy-updates,jammy-security,now 2.38.6-0ubuntu0.22.04.1 amd64 [installed,automatic]
libreoffice-gtk3/jammy-updates,now 1:7.3.7-0ubuntu0.22.04.2 amd64 [installed,automatic]
libwebkit2gtk-4.0-37/jammy-updates,jammy-security,now 2.38.6-0ubuntu0.22.04.1 amd64 [installed,automatic]
lightdm-gtk-greeter-settings/jammy,jammy,now 1.2.2-4 all [installed,automatic]
lightdm-gtk-greeter/jammy,now 2.0.8-2ubuntu1 amd64 [installed,automatic]

but don't know how to debug to find actual cause here.

General question - is this normally supported for XFCE desktop environment? At least inside other VM with GNOME as desktop environment - I could see it working, but would like to continue using XFCE if possible for various quick tests/prototypes.

Flags: needinfo?(stransky)

(In reply to Andrejus Chaliapinas from comment #9)

General question - is this normally supported for XFCE desktop environment? At least inside other VM with GNOME as desktop environment - I could see it working, but would like to continue using XFCE if possible for various quick tests/prototypes.

Frankly I have no idea.

Flags: needinfo?(stransky)

I have the same problem, this bug can be resolved by changing the cursor theme (e.g. Adwaita, or you can install another theme), or by create the missing cursor image file in your favorite theme.

/usr/share/icons/*/cursors/zoom-*

Well, I'm surprised: I tested installing a cursor theme from the internet (which supports zoom-in/out) and it works well in non-browser applications, in Gnome Web, but neither in Firefox, nor in Chromium.

Firefox ignores the cursors I choose and falls back to a default cursor.

I searched for themes with apt-cache search cursor-theme and it works well with Adwaita or Breeze themes, but not for Chameleon or Phinger (except in the Gnome Web browser).

It may be related to Gtk version you use. AFAK XFCE is based on Gtk2 (correct me if I'm wrong), Firefox uses Gtk3 and latest GNOME runs on Gtk4.
Every Gtk version has it's own themes/cursors and you may need different application to set theme/cursor for each.

I explored dependencies with apt-rdepends and Gnome Web is the only browser that depends on GTK (the 3rd), while Firefox and Chromium don't depend on GTK at all. So the problem could be related to this, if Firefox and Chromium try to fetch the cursors on their own and fail.

In the folders, structure trivial (the only oddity being the disparity of the *.theme files at the theme root):

/usr/share/icons$ find Adwaita Breeze_Snow Chameleon-White-Regular phinger-cursors -name '*.theme' -o -name zoom-in -o -name zoom-out
Adwaita/index.theme
Adwaita/cursor.theme
Adwaita/cursors/zoom-out
Adwaita/cursors/zoom-in
Breeze_Snow/index.theme
Breeze_Snow/cursors/zoom-out
Breeze_Snow/cursors/zoom-in
Chameleon-White-Regular/cursor.theme
Chameleon-White-Regular/cursors/zoom-out
Chameleon-White-Regular/cursors/zoom-in
phinger-cursors/index.theme
phinger-cursors/cursors/zoom-out
phinger-cursors/cursors/zoom-in

The zoom-in/out files start with "Xcur^P^@^@^@" so I understand that these are X11 cursors (which GIMP can open).

So normally on XUbuntu, the cursor to use for zoom-in would be:
/usr/share/icons/$(xfconf-query -c xsettings -p /Gtk/CursorThemeName)/cursors/zoom-in
In the /cursors/ folder, if the theme is complete, there is a cursor or link for all CSS values except auto and none.
(I pointed the list on https://developer.mozilla.org/fr/docs/Web/CSS/cursor)

You need to log in before you can comment on or make changes to this bug.