Closed Bug 1721036 Opened 2 years ago Closed 2 years ago

[Wayland] Popups are not shown with multi-buffer backend


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




92 Branch
Tracking Status
firefox92 --- verified


(Reporter: stransky, Assigned: rmader)


(Blocks 3 open bugs)



(2 files, 1 obsolete file)

When multi-buffer backend is used, some popups are not painted.

Reproduction steps:

  1. Go to about:preferences#home
  2. Click on any combo box there.
  3. The combo box button looks active (pressed) but popup window under it is not shown.
  4. Move mouse under the combo box (where a popup should be painted) and you'll see popup content now.

For debugging you also can remove gtk_widget_set_app_paintable() calls from nsWindow::Create(), all popups won't be transparent and you'll see if popup content is painted or not.

Robert, can you please look at it?

Also when mouse cursor is moved over menu toolbar some menu are not painted (I expect the same reason).

Attached video Screencast-popups.webm

Screencast of the issue.

Flags: needinfo?(robert.mader)

Indeed, will look into it! I also affects the compositor backend (which uses very similar logic), so I must have made a logic mistake in both of them.

Assignee: nobody → robert.mader
Flags: needinfo?(robert.mader)

moz_container_wayland_surface_lock currently only returns a valid
surface if ready_to_draw is set. This results in initial draws
not getting submitted, which the single buffer backend handles by
adding a timer.

For the multi-buffered backend there's no obvious reason to wait -
the buffer can already be attached and will become visible once the
surface gets mapped.

Blocking bug 1617498 as it's similarly affected and we might be able to come up with a common solution here.

Attachment #9231939 - Attachment is obsolete: true

When the MozContainer surface is not yet ready in Commit(),
we need to queue the commit.
Similar to nsWindow and WaylandVsyncSource we can do so by
registering via a callback via add_initial_draw_callback().

This required some logic changes which let to clean ups and
simplifications in the whole file (I'm sorry it got so big).

Pushed by
Delay buffer commits until the surface is ready,r=stransky
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch
Flags: qe-verify+

Reproduced the issue on Firefox 92.0a1 (2021-07-17) under Ubuntu 20.04 Wayland by following the STR from Comment 0.

The issue is no longer reproducible on Firefox 92.0 on the same system.

Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.