Closed Bug 1589970 Opened 5 years ago Closed 3 years ago

[KDE] Popup menus kept too small

Categories

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

x86_64
Linux
defect

Tracking

()

RESOLVED DUPLICATE of bug 1718727
Tracking Status
firefox-esr68 --- unaffected
firefox70 --- unaffected
firefox71 --- wontfix
firefox72 --- fix-optional

People

(Reporter: heftig, Assigned: stransky)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(3 files, 5 obsolete files)

I have a single 3840x2160 screen at scale 2. Popup menus (like the hamburger menu or the bookmarks menu) have their height limited to approx. half the screen.

I suspect this is a regression from bug 1565401 and the workarea size needs to be multiplied by the monitor's scale factor.

Firefox Nightly, GNOME Shell 3.34.1, Wayland, Arch Linux.

Jan, can you look at ti please?

Assignee: nobody → jhorak

Now, this patch makes scale 2 behave like scale 1 again ­— unfortunately this means that popup menus are pushed off the screen for me, because Wayland/Mutter does not report the actual workarea to the client so GTK just returns the screen size.

Seems the only way to size windows right is from the configure events from the xdg_toplevel or xdg_popup interfaces, which report the window size chosen by the compositor; the bounds are submitted to the compositor via xdg_positioner.

Old regression and Mozilla doesn't ship wayland officially, wontfix for 71.

Actually the patch breaks it for me again: https://ibb.co/Zg2yFwH
The gdk_monitor_get_workarea() returns 3840x2160 - ie. physical resolution of my display on my Fedora 30/31 (and I have 200% scaling set under Gnome shell). What does it returns to you?

Flags: needinfo?(jan.steffens)

It returns 1920x1080.

#!/usr/bin/env python3
import gi
gi.require_version("Gdk", "3.0")
from gi.repository import Gdk
Gdk.init([])
w = Gdk.Display.get_default().get_monitor(0).get_workarea()
print(f"{w.x:+d},{w.y:+d} {w.width}x{w.height}")

Outputs: +0,+0 1920x1080

I have scale-monitor-framebuffer enabled. GTK version is 3.24.12-32-g39e28ab933.

Flags: needinfo?(jan.steffens)
Attachment #9104285 - Attachment is obsolete: true

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.

Blocks: wayland-popup
No longer blocks: wayland

Can you please test latest nightly under Wayland? A new popup handling code landed there.
Thanks.

Attached image image.png

Still broken as of https://hg.mozilla.org/mozilla-central/rev/5d03a9d6cb8aeba1bb488b989712ad9cfa0546d2.

GNOME 40.1, 3840×2160, scale 2, scale-monitor-framebuffer, Arch Linux

(In reply to Jan Alexander Steffens [:heftig] from comment #3)

Seems the only way to size windows right is from the configure events from the xdg_toplevel or xdg_popup interfaces, which report the window size chosen by the compositor; the bounds are submitted to the compositor via xdg_positioner.

I agree with this. So the situation currently is that we can't resize based on reported screen size as there's no defined way how compositors have to report them (for this use case). Currently things work on Mutter without the experimental scale-monitor-framebuffer (read: fractional scaling) flag set - this mode is backward compatible with legacy X11 scaling for Xwayland apps and thus still the default. Other compositors and Mutter with scale-monitor-framebuffer behave differently and will all have this effect.

I think we just need to skip the part where Gecko computes the window size based on screen size and instead purely rely on NativeMoveResizeWaylandPopupCB / NativeMoveResizeWaylandPopupCallback (once bug 1661516 lands) to resize/flip popup windows.

Please re-test with new nightly as it gets another popup fixes.
Thanks.

Firefox Nightly 91.0a1.20210615214502+h206721f8064a-1

Firefox Nightly 91.0a1.20210615214502+h206721f8064a-1

Can you please re-test with latest nightly? (especially with Bug 1718727 fixed).
Thanks.

Flags: needinfo?(jan.steffens)
Flags: needinfo?(dimakrm361)

Firefox Nightly 92.0a1.20210809093320+ha1a26ba25fbc-1

Attachment #9227418 - Attachment is obsolete: true
Flags: needinfo?(dimakrm361)

(In reply to Dmitry Petrov from comment #17)

Created attachment 9235856 [details]
App menu. Scale 125%. KDE Plasma (Wayland)

Firefox Nightly 92.0a1.20210809093320+ha1a26ba25fbc-1

Can confirm on Gnome that it's not fixed it current nightly - however AFAICS the nightly with bug 1718727 has not been build yet, i.e. test again in a couple of hours / tomorrow.

Firefox Nightly 93.0a1 (2021-08-11)

Seems fixed, assuming widget.wayland.fractional_buffer_scale is not set. Tested with 150% scaling.

Flags: needinfo?(jan.steffens)

In Firefox Nightly 93. 0a1 (2021-08-12), the popup menu is the same as yesterday.

Attachment #9235856 - Attachment is obsolete: true
Priority: -- → P3
Summary: Popup menus kept too small → [KDE] Popup menus kept too small
Assignee: jhorak → stransky
Attachment #9227423 - Attachment is obsolete: true

I just tested latest nightly and KDE Wayland with 125% scale and it works as expected, menu is not truncated.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE

Menu is still truncated. What I should do?
KDE Plasma 5.22.4 Arch Linux

Attachment #9235860 - Attachment is obsolete: true
Flags: needinfo?(stransky)

widget.wayland.fractional_buffer_scale is 0.0

Please file a new bug for it, attach about:support there. Also please try a new profile:
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems?rd=Bug_info_Firefox#Test_Firefox_with_a_new_profile

Flags: needinfo?(stransky) → needinfo?(dimakrm361)
Flags: needinfo?(dimakrm361)

Sorry, I mean this: bug 1727073

Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: