Closed Bug 1718867 Opened 11 months ago Closed 8 months ago

[Persistent popups] With wayland enabled, notification popup can extend beyond the edge of the screen

Categories

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

Firefox 91
defect

Tracking

()

RESOLVED FIXED
94 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox-esr91 --- wontfix
firefox91 --- wontfix
firefox92 --- wontfix
firefox93 --- wontfix
firefox94 --- fixed

People

(Reporter: henry, Assigned: stransky)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

Steps to reproduce

Do the following, once with and once without MOZ_ENABLE_WAYLAND=1:

  1. Shrink the window lengthways so the width is narrow (less than the width of a notification popup).
  2. Move the window to the right hand side.
  3. Go to about:addons and start to install an addon.

You should see the installation and confirmation popups.

Result

When xwayland is in use, the notification popup extends to the left of its anchor, such that the notification is fully visible.

When wayland is in use, the notification popup still extends to the right of its anchor, such that the notification is cut off by the edge of the screen.

Expect

The wayland behaviour to match the xwayland behaviour

Discussion

In firefox, this isn't a big issue because the notification anchor is to the left of the URL entry, so the notification will normally be able to extend to the right without any issue.

I'm not sure if there are places in firefox that spawn popup notifications on the right hand side.

However, in thunderbird, the notifications for addons or updates is anchored to the right of the top bar, so this cut off problem can appear even in full screen when using wayland. See Bug 1718653. In Thunderbird at least, my guess is that it is related to the persistent property for the popup notification (https://bugzilla.mozilla.org/show_bug.cgi?id=1718653#c4).

I thought maybe someone here might have a better idea about the problem.

No longer blocks: 1718653
Blocks: 1718653

Can you please attach a screenshot of that?
Thanks.

Flags: needinfo?(henry)
Priority: -- → P2

Is there a way how to reproduce it in Firefox? Can I use any extension for it or run that from console or so?

Flags: needinfo?(henry)

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

Is there a way how to reproduce it in Firefox? Can I use any extension for it or run that from console or so?

I'm able to reproduce with Firefox 91.0a1 (2021-07-01) (64-bit) using the "Steps to reproduce" from :henry's initial comment in Bug 1718867. Screenshot attached.

Yes, this is a problem with persistent popups which are positioned out of popup hierrachy on Wayland - they're positioned just by move and not xdg_positoner. We can consider to use xdg_positioner to place them and then move (we can't use xdg_positioner for them directly).

Summary: With wayland enabled, notification popup can extend beyond the edge of the screen → [Persisten popups] With wayland enabled, notification popup can extend beyond the edge of the screen

Unfortunately we can't use xdg_positioner here as it doesn't work with subsurface popups. Let's try some minor fix where we check Firefox window boundaries - that's all we can do for the persistent popups.

When we position persistent popup we can't use xdg_positioner as the popup
is rendered aside popup hierarchy and can be closed by user interaction only.

To try to keep the popup on screen by just moving it in scope of
it's parent window.

Assignee: nobody → stransky
Status: NEW → ASSIGNED
Duplicate of this bug: 1718653
Attachment #9240043 - Attachment description: Bug 1718867 [Wayland] Move persistent popup in bounds of parent window, r?emilio → Bug 1718867 [Wayland] Move noautohide popup in bounds of parent window, r?emilio
Pushed by stransky@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/457c297c9bf2
[Wayland] Move noautohide popup in bounds of parent window, r=emilio
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch
Regressions: 1730079
Summary: [Persisten popups] With wayland enabled, notification popup can extend beyond the edge of the screen → [Persistent popups] With wayland enabled, notification popup can extend beyond the edge of the screen
You need to log in before you can comment on or make changes to this bug.