Closed Bug 1525058 Opened 5 years ago Closed 3 years ago

[Wayland scaling] display of menus only on top left part of screen

Categories

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

x86_64
Linux
defect

Tracking

()

RESOLVED DUPLICATE of bug 1543035

People

(Reporter: git, Unassigned)

References

(Blocks 1 open bug)

Details

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

Steps to reproduce:

(Under Sway 1.0-rc1)

  • Set scaling of monitor to 2 (other values not tested)
  • Open Firefox in Wayland mode (env GDK_BACKEND=wayland firefox) (Nightly and Beta both seem to have this issue)
  • Open one of the following things on the right or bottom side of the screen:
    • Right click menu
    • "Middle click to scroll" (works, but the icon doesn't display or displays too high)
    • Plugin overflow menu
    • Bookmark menu
    • etc

Actual results:

One of two things:

  • When opening the menu on the right side of the screen, nothing at all displays.
  • When opening on the bottom left quadrant of the screen, the menus display, but in the top left quadrant. Also, the menu is shrunk smaller the further down the screen you click, but becomes the regular size again if it would've had negative size otherwise. Looks like it is "trying" to render in the correct location, but the bottom is cut off.

(top left quadrant works as expected)

Further note: when I scale the browser window below half my original screen size, the issue disappears. When scaling it between half and full screen, only the part of the screen that is actually in the "larger than virtual" part of the window has this issue

Expected results:

Menus should have opened regularly.

Component: Untriaged → Widget: Gtk
OS: Unspecified → Linux
Product: Firefox → Core
Hardware: Unspecified → x86_64
Summary: [Nightly] Wayland scaling display of menus only on top left part of screen → [Nightly] [Wayland scaling] display of menus only on top left part of screen

Probably a duplicate of https://bugzilla.mozilla.org/show_bug.cgi?id=1525058. It seems Firefox messes up were the cursor position is on its surface compared to the size its rendered at.

For people that want to implement this, I think the issue is that the rendered size is 2x but the display is not that big, so Firefox thinks that its window is 4x its size.

The relevant code portion is probably https://dxr.mozilla.org/mozilla-central/source/widget/gtk/nsWindow.cpp?q=widget%2Fgtk%2FnsWindow.cpp&redirect_type=direct#1089
Also there was a similar bug before (not related to fractional scaling) https://bugzilla.mozilla.org/show_bug.cgi?id=1239855 and its changeset https://phabricator.services.mozilla.com/rMOZILLACENTRALf4bd1fc36f919836ad9b8ee5cb8b89a16aa4968c

Summary: [Nightly] [Wayland scaling] display of menus only on top left part of screen → [Sway][Nightly] [Wayland scaling] display of menus only on top left part of screen
Blocks: wayland-sway
No longer blocks: wayland

Because this was added to the Sway Wayland tracker.
I'm having this issue on Gnome 3.32 Wayland so I don't think it's related to sways wayland implementation.

(In reply to taaem from comment #3)

Because this was added to the Sway Wayland tracker.
I'm having this issue on Gnome 3.32 Wayland so I don't think it's related to
sways wayland implementation.

Can you please file another bug for it? Thanks.

Flags: needinfo?(taaem)

I'm pretty sure this is a duplicate of https://bugzilla.mozilla.org/show_bug.cgi?id=1543035 and it should get fixed by https://gitlab.gnome.org/GNOME/gtk/merge_requests/750 (don't know if it requires further action from ff).
A different fix was proposed for mutter here: https://gitlab.gnome.org/GNOME/mutter/merge_requests/510, but was rejected in favour of the fix in gtk.

So yeah, I think this bug is not sway related and should get fixed soon for all compositors that support xdg-output.

(In reply to Martin Stránský [:stransky] from comment #4)

(In reply to taaem from comment #3)

Because this was added to the Sway Wayland tracker.
I'm having this issue on Gnome 3.32 Wayland so I don't think it's related to
sways wayland implementation.

Can you please file another bug for it? Thanks.

I think it is how robert.mader said, the bug is happening on different compositors/DE's.
But indeed it is probably my fault that I didn't find the Gnome related bug report.

Flags: needinfo?(taaem)

Okay, Thanks.

Blocks: wayland
No longer blocks: wayland-sway
Summary: [Sway][Nightly] [Wayland scaling] display of menus only on top left part of screen → [Wayland scaling] display of menus only on top left part of screen
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3

As said before this is a duplicate of https://bugzilla.mozilla.org/show_bug.cgi?id=1543035 and fixed in gtk 3.24 master / 3.24.9

Blocks: wayland-sway
No longer blocks: wayland

Works for me on gtk 3.24.9, which was released 6 days ago.

I don't see this problem in Ubuntu 19.10, FF 71.0~b7+build1-0ubuntu0.19.10.1 (webrender and basic) and sway 1.2 / wlroots 0.8.1

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.