[fractional scaling] main menu do not fit screen size under fractional scaling (gnome/wayland)
Categories
(Core :: Widget: Gtk, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox91 | --- | fixed |
People
(Reporter: crab2313, Assigned: filip.hejsek)
References
(Blocks 1 open bug)
Details
Attachments
(7 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:82.0) Gecko/20100101 Firefox/82.0
Steps to reproduce:
desktop environment: gnome 3.38 with fractional scaling enabled (125%)
Start firefox with MOZ_ENABLE_WAYLAND=1 and open the main menu.
Actual results:
The main menu do not fit the whole screen and have a scrollbar.
Expected results:
The main menu should not use a scrollbar since the screen is large enough to display the entire menu.
Hi crab2313,
Thanks for reporting this bug.
I don't have that specific configuration but I'll go ahead and add a product and component so the corresponding team can investigate.
In the meantime, can you download Firefox Nightly and see if the issue is reproducible there as well? You can download it from here: https://nightly.mozilla.org
Regards,
Virginia
(In reply to Virginia Balducci from comment #2)
Hi crab2313,
Thanks for reporting this bug.
I don't have that specific configuration but I'll go ahead and add a product and component so the corresponding team can investigate.
In the meantime, can you download Firefox Nightly and see if the issue is reproducible there as well? You can download it from here: https://nightly.mozilla.org
Regards,
Virginia
The latest nightly version still has the issue.
ping!
I think UI related issues should belong to the Firefox product.
Can you please test latest nightly under Wayland? A new popup handling code landed there.
Thanks.
Assignee | ||
Comment 6•4 years ago
|
||
The bookmark popup can now be scrolled, so the buttons are accessible, but the size is still too small (version 91.0a1 20210601213358).
Assignee | ||
Comment 7•4 years ago
|
||
The menu popup is also too small
Comment 8•4 years ago
|
||
Comment 9•4 years ago
|
||
Problem also appears in KDE Plasma (Wayland).
Additional info:
gfx.monitors resolution is 3072x1728 (from telemetry)
In the browser toolbox, size of the screen is 1536x824 (check size of browser's <body> container)
Actual resolution is 1920x1080 with 125% screen scale.
Assignee | ||
Comment 10•4 years ago
|
||
A reported resolution of 3072x1728 is expected, fractional scaling in Wayland is implemented by rendering at 2x scale and downscaling the resulting buffer (this is a limitation of the protocol, although there is some ongoing work to improve that).
The problem here seems to be that some code responsible for ensuring popups fit into the screen doesn't take into account the scaling factor (or maybe applies it twice). The result is that popups use only half of the available screen space. I think the problem is somewhere in nsWindow.cpp (https://searchfox.org/mozilla-central/source/widget/gtk/nsWindow.cpp), but i didn't yet have time to set up Firefox build environment and debug the problem.
Assignee | ||
Comment 11•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 12•4 years ago
|
||
I have found that GetScreenRect returns the screen size from gdk without conversion, but the size is then interpreted as device pixels, so i created a patch which fixes that. After this change, the bookmark popup and the context menu have the right size, but the app menu is still too small, so there must be something else causing that.
Comment 13•4 years ago
|
||
Comment 14•4 years ago
|
||
bugherder |
Comment 15•4 years ago
|
||
This bug is not yet fixed by the patch above, right?
Comment 16•4 years ago
|
||
If this commit is already in a fresh build, then the problem has not been resolved yet.
Comment 17•4 years ago
•
|
||
This bug is a duplicate of bug 1589970. That bug has a patch which attempts pretty much the same solution, but had to be discarded because it breaks non-fractional-scaling mode.
Whether the monitor units are in device pixels or "logical" pixels depends on mutter's scale-monitor-framebuffer
setting. So the monitor sizes are no use at all.
See the discussion in https://gitlab.gnome.org/GNOME/mutter/merge_requests/510: GdkMonitor cannot be used to size windows on Wayland because you can't know what the units are, even if you knew which monitor your surface is going to be placed on.
Attempting to use workarea at all is an exercise in futility.
This patch should be backed out.
Assignee | ||
Updated•4 years ago
|
Description
•