Open Bug 1755231 Opened 2 years ago Updated 2 months ago

[Partial scale] Missing cursor scale - Mouse pointer tiny on Firefox 96/Wayland/Ubuntu 21.10

Categories

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

Firefox 96
defect

Tracking

()

REOPENED

People

(Reporter: spotter, Unassigned)

References

(Depends on 1 open bug, Blocks 2 open bugs)

Details

Attachments

(5 files)

Attached image inside.png

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

Steps to reproduce:

set the mouse theme so the mouse is visible on my hidpi display

Actual results:

mouse is barely visible (as rendered tiny) only when within firefox window

Expected results:

the mouse to not change as it moved into and out of firefox window.

Attached image outside.png

can see the change with the 2 images I'm attaching. one shows the mouse outside the area being rendered by firefox, the other shows it within it. the mouse inside firefox is barely visible, while when outside is clearly visible.

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

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

What do you mean with 'set the mouse theme so the mouse is visible on my hidpi display' ? How did you do that? When I change cursor theme on Tweaks (Gnome 41.3) the cursor has the same size on HiDPI (200% scale). Do you use fractional scale for instance?

Blocks: wayland
Flags: needinfo?(spotter)

I am pretty sure I do use fractional scaling (probably 150%), but on a different computer at moment so can't check. can check soon.

Flags: needinfo?(spotter)

so it was actually 125%, but I've now turned off fractional scaling (and set it to 200% scaling) and the same issue is visible. (not tiny to be invisible, but very different mouse pointer sizes). will attach screenshots

Attached image outside-200%.png
Attached image inside-200%.png

and in general, the cursor theme in gnome tweaks doesn't seem to be respected by firefox (its always the same cursor when inside the firefox window, as i cycle through different cursor themes in gnome tweaks, with those cursor themes instantly reflected when moved inside non firefox windows). Perhaps related, but not the issue at hand for me. I could deal with firefox rendering the cursor differently if it was visible.

ok, perhaps not a bug. restarted firefox and everything is now good. Unsure what changed (besides now being on firefox 97)

unsure what could have changed, besides firefox changed. laptop has an uptime of 15 days, a little long, but not crazy long. anyways, as restarted/upgraded (probably snap), unsure how to duplicate anymore.

Ok let's call this WFM for now. If we have a way to repro then we should reopen / file a new bug. Thanks for reporting.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME

reproduced it.

I believe its due to the way its restarted via the crash handler.

If its started normally, pointer is normal. If it's restarted via crash handler, pointer is tiny (as pictures shown above)

Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: WORKSFORME → ---

Please attach about:support page when the cursor is small.
Thanks.

Flags: needinfo?(spotter)
Priority: -- → P3

ok, will have to wait for it to crash again (not such a common occurrence) and then before I restart it, will do that.

Flags: needinfo?(spotter)

sorry for clearing the flag. didn't meant to do that.

you can use 'kill -11 firefox_pid' on terminal
where firefox_pid is PID of main firefox process, you can get it from 'ps axf' command.

Alternatively just browsing to about:crashparent should do

ugh. it didn't reproduce this time. so I guess my thought on why it happened again, wasn't correct. hmph. I'll have to wait to see if I can reproduce it on demand. really thought it was due to the crash/restart as I noticed it right afterwards.

crashed and happened again.  I should note that it the cursor was small, even before it restarted (i.e. in the crash handler window)

I can confirm this bug - Ubuntu 21.10, Firefox 97 - was wondering why the pointer is so tiny all of a sudden when moving it into the Firefox window and Google brought me here. Firefox crashed before the current session.

I have the same issue in KDE plasma with Screen scaling set to > 100%, I opened another bug #178618 but I guess these are related.

For me it looks like firefox doesn't get the current scaling of the screen, whether it's moved to the screen or it just starts there, assumes 100% perhaps?

Sorry, I meant #1786182

Any updates on this? It does repro for me in Firefox Developer Edition 114.0_beta7 in Sway on Alpine Edge. Firefox keeps writing this to console. I use 1.25 scale.

(firefoxdeveloperedition:11230): Gdk-WARNING **: 19:46:07.491: ../gdk/wayland/gdkcursor-wayland.c:242 cursor image size (9x16) not an integermultiple of scale (2)

Looks like we should deal somehow with that as Mutter 44 is going to enforce correct buffer sizes too. Not sure how Sway implements fractional scale but Mutter use double sized buffer and then shrinks it to 1.25.

I think Sway is doing the same, the GDK message is complaining about scale 2 and my actual scale is 1.25.

I just tested gedit and it seems to have the same bug. But Settings looks fine.

I have the same problem. I just updated to Ubuntu 23.04 but I was using Firefox installed from the website. The Ubuntu installation crashed because it was trying to replace firefox with the snap version, somehow it wasn't successful and left me the computed in a half installation state. After managing to complete the installation, uninstalling firefox, and installing firefox 103.0.1 from snap, the cursor is now tiny. My display is at 200%.

Gtk3 doesn't support partial scale for cursors. To fix that we need to load cursor as bitmap and scale it according screen resolution.
Gtk4 already supports that do you see correct cursor size in Gnome UI like Settings.

If anyone is willing to help a related code is here:
https://searchfox.org/mozilla-central/rev/603b9fded7a11ff213c0f415198cd637b7c86614/widget/gtk/nsWindow.cpp#7647

Summary: Mouse pointer tiny on Firefox 96/Wayland/Ubuntu 21.10 → Missing cursor scale - Mouse pointer tiny on Firefox 96/Wayland/Ubuntu 21.10
Duplicate of this bug: 1834956

Hey so I don't know what changed, but I suddenly have beautiful cursors in Firefox. I suppose GTK got updated? https://download.gnome.org/sources/gtk+/3.24/gtk%2B-3.24.38.news

(In reply to julie from comment #31)

Hey so I don't know what changed, but I suddenly have beautiful cursors in Firefox. I suppose GTK got updated? https://download.gnome.org/sources/gtk+/3.24/gtk%2B-3.24.38.news

I don't see any change on Fedora 38 / gtk+3.24.38.

It broke again. I have no idea what changed :(

(In reply to julie from comment #33)

It broke again. I have no idea what changed :(

If you go to about:support, what does "Window Protocol" contain? wayland or xwayland?

It's Wayland now, and I'm sure it was Wayland when it was working two days ago. Cursors are correctly sized when running in XWayland, but everything is very obviously blurry (probably because of fractional scaling?).

Found the difference. When I install wxwidgets-dev (3.2.2.1-r0) APK package, the cursors become tiny (repro'd in Firefox, Chromium, and Thunar). When I remove that package, the cursors are correct

Summary: Missing cursor scale - Mouse pointer tiny on Firefox 96/Wayland/Ubuntu 21.10 → [Partial scale] Missing cursor scale - Mouse pointer tiny on Firefox 96/Wayland/Ubuntu 21.10

I narrowed it down a bit more. The root cause seems to be the gsettings-desktop-schemas package. When it is installed, Firefox (and other GTK 3 apps) use the equivalent of gsettings get org.gnome.desktop.interface cursor-size to read the cursor size, instead of reading ~/.config/gtk-3.0/settings.ini directly.

Duplicate of this bug: 1830622

Weirdly enough, on my system, the cursor size is correct on any scaling <= 200%. However, on anything bigger (including 300%), it's too big.

I posted the details here: https://bugzilla.mozilla.org/show_bug.cgi?id=1830622#c3

Duplicate of this bug: 1786182

I am now experiencing this bug after Firefox 121.0 enabled Wayland by default on the Flatpak distribution. I am using a 150% scale factor and only certain cursors appear to be impacted (mainly the default pointer). This was observed on: Mozilla Firefox Flatpak ("mozilla-flatpak - 1.0") 121.0 (64-bit) running on KDE Plasma (Wayland) 5.27.9 (KDE Frameworks 5.107.0 / Qt 5.15.10) and Linux Debian unstable/sid (as of 2023-12-19)

Duplicate of this bug: 1879674

same situation for me on ff 122.0.1 (64 bits) with wayland plasma 5.27 kubuntu 23.10 scale 225% ;

the pointer looks good in any application using the classic theme except in firefox

For me, it is related to Wayland and scaling. If I turn off scaling, the cursor stays the same size everywhere. With fractional scaling the cursor does not get scaled over Firefox and other GTK apps.

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

Attachment

General

Creator:
Created:
Updated:
Size: