Closed Bug 1754950 Opened 4 years ago Closed 3 years ago

[Wayland] Pop up menus are flashing/flickering when opened/resized

Categories

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

Desktop
Linux
defect

Tracking

()

VERIFIED FIXED
Tracking Status
firefox-esr91 --- disabled
firefox97 --- disabled
firefox98 --- disabled
firefox99 --- disabled
firefox100 --- verified

People

(Reporter: atrif, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: regression)

Attachments

(5 files)

Attached image flash.gif

Affected versions

  • 99.0a1
  • 98.0b3
  • 97.0 (if Wayland ENV enabled)
  • 91.6.0esr (if Wayland ENV enabled)

Affected platforms

  • Ubuntu 21.04

Steps to reproduce

  1. Open Firefox and Protection menu.
  2. Expand and narrow the protection menu.

Expected result

  • No visual glitches.

Actual result

  • Protection menu is flashing. This can be seen when opening Pocket and the downloads menu as well.

Regression range

Notes

  • Screen Recording attached.
  • Reproduced on two VM stations with Ubuntu 21 while having Wayland inside about:support-> Protocol Window. Cannot reproduce with xWaylan on Protocol Window. I don’t know if this reproduces on native installed ubuntu 21 as well.
  • 97.0 and 91.6.0esr are affected as well if opened with Wayland ENV enabled.
Has Regression Range: --- → yes
Has STR: --- → yes

Do you see the flashing with permission/addon popups only?

Flags: needinfo?(alexandru.trif)

Please run Firefox on terminal with MOZ_LOG="WidgetPopup:5", reproduce the flashing once and attach the log here.
Thanks.

Attached image flash_02.gif

(In reply to Martin Stránský [:stransky] (ni? me) from comment #1)

Do you see the flashing with permission/addon popups only?

I can see this on the Downloads Panel and Library panel as well.

(In reply to Martin Stránský [:stransky] (ni? me) from comment #2)

Please run Firefox on terminal with MOZ_LOG="WidgetPopup:5", reproduce the flashing once and attach the log here.
Thanks.

I will run this and come back with the details.

I hope this helps. This was reproduced inside Library-> Bookmarks panel. I tried making another one on the Protection pop up but after the restart, for some reason, the logs are no longer exported. If there is another log needed please let me know.

Flags: needinfo?(alexandru.trif)
Attachment #9263456 - Attachment mime type: application/octet-stream → text/plain

:atrif, since this bug is a regression, could you fill (if possible) the regressed_by field?
For more information, please visit auto_nag documentation.

Flags: needinfo?(alexandru.trif)

Yes, that's because we use move-to-rect to position that window. Just for the check, please go to about:config, add 'widget.use-move-to-rect' boolean key, set it to false and restart browser. You should not see that flickering then.
As a workaround we may use move-to-rect only if popup window is outside of main browser window.

Attached image 1754950.gif

(In reply to Martin Stránský [:stransky] (ni? me) from comment #6)

Yes, that's because we use move-to-rect to position that window. Just for the check, please go to about:config, add 'widget.use-move-to-rect' boolean key, set it to false and restart browser. You should not see that flickering then.
As a workaround we may use move-to-rect only if popup window is outside of main browser window.

Hello! Unfortunately, I can still see the flicker on Ubuntu 21.1 VM with Firefox 98.0b5 after setting the above pref as described. Please see the attached screen recording.

Clearing ni? because I don't know for sure if the regression range is accurate.

Flags: needinfo?(alexandru.trif)

Yes, it's caused by repeated resize of the popup and workaround for move-to-rect where window needs to be hidden to reposition/resize it.

We have only few options how to handle it due to a bug in Wayland/Gtk: https://gitlab.gnome.org/GNOME/gtk/-/issues/1986 which is fixed in Gtk4.

There's a new xdg-popup 'reposition' interface for it:
https://lists.freedesktop.org/archives/wayland-devel/2019-October/040968.html

For most cases it's fixed by Bug 1760276.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
Depends on: 1760276
Resolution: DUPLICATE → FIXED
See Also: 1760276
Attached image ubuntu_flash_2.gif

Hello Martin!
I looked over this today and the initial issue seems to be gone on Ubuntu 21.04 using Firefox 100.0b7 (20220417185951) with Wayland. I can no longer see the flashing on the Libray/ Downloads and Enhanced Tracking Protection dropdowns.

However, there is a slight flash when expanding/ collapsing the Enhanced Tracking Protection dropdown. I attached a screen recording. This also seems to be intermittent and it's not as obvious as before. I cannot reproduce it on xwayland window protocol.

Should we close this issue as verified and open another one for the remaining issue? Thank you!

Flags: needinfo?(stransky)

The fix here works only when popup window is inside main Firefox window - in such case we expect it's also visible on screen so we don't use move-to-rect popup placement which involves the flashing during popup resize.

So this is expected behavior and covers 99% user cases I guess.

Flags: needinfo?(stransky)

Thank you, Martin! Closing this per comment 11 and comment 12.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Summary: [Wayland] Pop up menus are flashing when opened → [Wayland] Pop up menus are flashing/flickering when opened/resized
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: