Closed Bug 1593408 Opened 2 years ago Closed 2 years ago

[Wayland][WebRender] Maximized windows are offset / clicks and focus are a few pixels below pointer when maximized

Categories

(Core :: Widget: Gtk, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox-esr68 --- unaffected
firefox70 --- unaffected
firefox71 --- wontfix
firefox72 --- fixed

People

(Reporter: yoasif, Assigned: stransky)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: nightly-community, regression)

Attachments

(8 files, 1 obsolete file)

Attached image bad.png

Noticed that when Firefox is maximized, the area that is clicked when I click is a few pixels below where my pointer is.

The window is also not actually maximized (I see a dark border above the window).

See screenshots.

I also suspect that this screencast is a demonstration of what is occurring: https://imgur.com/XoxKMn8 (reported at: https://www.reddit.com/r/firefox/comments/dqaso5/active_hyperlinks_not_highlighting_correctly/ )

9:29.96 INFO: No more inbound revisions, bisection finished.
9:29.96 INFO: Last good revision: 7449a8c1f27bf1c6c1f7ecce1294f1095579ecbf
9:29.96 INFO: First bad revision: 475496111203207e076e6ac8c62d4dfc87df871f
9:29.96 INFO: Pushlog:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=7449a8c1f27bf1c6c1f7ecce1294f1095579ecbf&tochange=475496111203207e076e6ac8c62d4dfc87df871f

Attached image good.png
Attached file about:support

Martin, I suspect that the patch in bug 1592350 caused the issue I am seeing here. Can you take a look?

Has Regression Range: --- → yes
Flags: needinfo?(stransky)
Regressed by: 1592350
Blocks: wayland
Summary: Maximized windows are offset / clicks and focus are a few pixels below pointer when maximized → [Wayland][WebRender] Maximized windows are offset / clicks and focus are a few pixels below pointer when maximized

I have this bug on SwayWM even without fullscreen. Floating a window does display it normally.

There was a brief window after https://bugzilla.mozilla.org/show_bug.cgi?id=1589114 when neither bug was present and gfx.webrender.force-disabled wasn't needed, so this is a more recent regression.

Can you please run firefox with WAYLAND_DEBUG=1 and attach the log here? Thanks.

Flags: needinfo?(stransky) → needinfo?(yoasif)
Attached file firefox.zip

I'm not sure what I was supposed to do after enabling the log, but here's the log - the issue showed itself.

Flags: needinfo?(yoasif)

Second log attached, and I also took a screen recording in case that helps show the behaviour.

Screen recording showing how this behaves in a tiling window manager including floating and fullscreen.

Steps demonstrated:

  • Window manager starts in horizontal split mode
  • Started firefox
  • Switched to stack layout
  • Moved terminal to left of stack
  • Opened new firefox window
  • Moved new window to the left
  • Made it floating: in this mode the bug doesn't occur
  • Made it fullscreen, bug occurs again
  • Unfloated it, moved it back into the stack on the right

Yes I can see it now, this is WR variant of bug 1592350, I'll look at it.

Hm, for some reason the subsurface is positioned to (0,0) instead of (26, 23).

WebRender does not call moz_container_get_wl_egl_window() before each frame so mozcontainer
is not positioned properly here.

As a fix position mozcontainer directly at moz_container_move() if there are resources
for it.

Also always call moz_container_get_wl_surface() at moz_container_get_wl_egl_window()
to make sure an underlying mozcontainer surface is properly positioned.

Assignee: nobody → stransky
Pushed by cbrindusan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/19188ca45113
[Wayland] Position mozcontainer wayland subsurface at moz_container_move(), r=jhorak
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72

This bug is marked “unaffected” for firefox71, but I’m seeing exactly this problem in Firefox 71.0 on Ubuntu 20.04 using GNOME Shell with Wayland and MOZ_ENABLE_WAYLAND=1. Maximized and/or half-maximized windows are offset to the bottom right just like the bad.png screenshot, and mouse clicks are registered at a different location from where the cursor appears. Can this fix be backported?

(In reply to Anders Kaseorg from comment #14)

This bug is marked “unaffected” for firefox71, but I’m seeing exactly this problem in Firefox 71.0 on Ubuntu 20.04 using GNOME Shell with Wayland and MOZ_ENABLE_WAYLAND=1. Maximized and/or half-maximized windows are offset to the bottom right just like the bad.png screenshot, and mouse clicks are registered at a different location from where the cursor appears. Can this fix be backported?

Yes, I see that too, it's because Bug 1592350 was backported to 71.

Ryan, is is possible to take this one to 71 or is too late? It's low risk wayland only patch. Thanks.

Flags: needinfo?(ryanvm)

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

Ryan, is is possible to take this one to 71 or is too late? It's low risk wayland only patch. Thanks.

Unfortunately it also needs patch from Bug 1592933, I think it's better to leave it as it's for 71.

Flags: needinfo?(ryanvm)
Depends on: 1592933
Attached patch Firefox 71 patch (obsolete) — Splinter Review

backported patch for 71

We are in RC so this is too late for our release next week, wontfix 71.

Comment on attachment 9111896 [details] [diff] [review]
Firefox 71 patch

It does not build.
Attachment #9111896 - Attachment is obsolete: true

Still affected on FF74 -- both maximizing and fullscreen cause the alignment issue. What's the status on the proposed fix?

Arch Linux x86_64 linux-amd 5.5.9
AMD Ryzen 5 3500U with Vega Mobile graphics
GNOME Shell 3.36.0 on Wayland
WebRender enabled

(In reply to Karim Vergnes from comment #21)

Still affected on FF74 -- both maximizing and fullscreen cause the alignment issue. What's the status on the proposed fix?

Arch Linux x86_64 linux-amd 5.5.9
AMD Ryzen 5 3500U with Vega Mobile graphics
GNOME Shell 3.36.0 on Wayland
WebRender enabled

Please file a new bug for it - this one is already closed.
Thanks.

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