Closed Bug 1536747 Opened 6 years ago Closed 5 years ago

[Wayland] Picture-in-picture video window is not always on top

Categories

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

Unspecified
Linux
defect

Tracking

()

VERIFIED FIXED
mozilla71
Tracking Status
firefox71 --- verified

People

(Reporter: ke5trel, Assigned: stransky)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Picture-in-picture is able to stay on top with XWayland but not when enabling GDK_BACKED=wayland on Ubuntu 18.10.

Can you point me to any testcase I can use? Thanks!

Flags: needinfo?(ke5trel)

STR:

  1. Set media.videocontrols.picture-in-picture.enabled = true.
  2. Right-click a youtube video twice to show the native context menu and choose Picture in Picture.
  3. Focus a different Firefox window.

The video window should stay on top.

Flags: needinfo?(ke5trel)

Yes, I can reproduce it, Thanks.

Unfortunately gdk_window_set_keep_above() is no-op on Wayland so I don't know if we can implement it somehow.

It would be possible to call gdk_window_show_window_menu() and allow user to make the window always on top.

Hm, the picture-in-picture feature seems to be broken to me on latest trunk, on X11 and on Wayland. The video window is closed immediately after its creation.

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

Hm, the picture-in-picture feature seems to be broken to me on latest trunk, on X11 and on Wayland. The video window is closed immediately after its creation.

PiP still works the same for me on XWayland and Wayland, Nightly 68.0a1 20190402083512 on Ubuntu 18.10.

Workaround for this bug is to press Alt+Space to show the application menu and enable Always on Top which works as expected.

Priority: -- → P3

This is fixed on latest Nightly, one downside is the PiP window now has a titlebar but it's a small sacrifice for it staying on top.

Fix window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=b5d436985831449e4f160b10abc362d937a6486c&tochange=969b3828a301038c57540d8bffb51539132d393c

Fixed by Bug 1543027.

Status: NEW → RESOLVED
Closed: 5 years ago
Depends on: 1543027
Resolution: --- → WORKSFORME

This is not yet fixed for me (Nightly on GNOME 3.34).

The PIP window is being held above browser windows but not above windows of other applications.

There's other weird behavior: Moving focus from another app to a browser window also brings the PIP window to the foreground. Moving focus from another app to the PIP window also brings the last-focused browser window to the foreground. The latter is especially irritating.

Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---

We can only open a window manager menu and let user to place it on top. There's no way how it can be placed on top by application on Wayland as it's disabled by design.

Not entirely true since we have seen that dialog windows can stay on top of their own application windows which is more than nothing.

Assignee: nobody → stransky

(In reply to Jan Alexander Steffens [:heftig] from comment #9)

This is not yet fixed for me (Nightly on GNOME 3.34).

The PIP window is being held above browser windows but not above windows of other applications.

There's other weird behavior: Moving focus from another app to a browser window also brings the PIP window to the foreground. Moving focus from another app to the PIP window also brings the last-focused browser window to the foreground. The latter is especially irritating.

That's behavior of dialog window which is tied to an actual window by transient_for bound. Another reason why the dialog is wrong here.

No longer depends on: 1581942
Depends on: 1584492

Could not land bug 1584492, thus clearing checkin-needed here.

Keywords: checkin-needed

Pushed by cbrindusan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ca257801d86f
[Linux] PictureInPicture window - open window manager menu on right mouse click, r=jhorak

Keywords: checkin-needed
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71

I have managed to reproduce the issue following the STR from comment 2 on Ubuntu 18.04 using Fx 67.0a1 (2019-03-04) I can confirm that the issue is fixed on Fx 71.0b11.

Status: RESOLVED → VERIFIED
Flags: qe-verify+

The issue does not appear to be resolved on Firefox 74 on Fedora 31.

(In reply to nikola.tss from comment #18)

Created attachment 9134253 [details]
Screenshot from 2020-03-18 21-47-35.png

The issue does not appear to be resolved on Firefox 74 on Fedora 31.

Everything works fine on Firefox Nightly with the same profile, but running on x11 backend instead of Wayland.

Works for me out of the box in Fedora 32. I wonder if 'always on top' was added to mutter here or so (mutter-3.36.0-1.fc32.x86_64).

(In reply to nikola.tss from comment #18)

The issue does not appear to be resolved on Firefox 74 on Fedora 31.

You need to right-click on the PiP window and choose "Always on Top" every time you create one.

(In reply to Kestrel from comment #21)

(In reply to nikola.tss from comment #18)

The issue does not appear to be resolved on Firefox 74 on Fedora 31.

You need to right-click on the PiP window and choose "Always on Top" every time you create one.

I see. Hopefully mutter implements a way for Firefox to launch it with Always On Top by default.

Is there an associated Mutter bug for this? Would love to see this fixed eventually...

(In reply to Kai Mast from comment #23)

Is there an associated Mutter bug for this? Would love to see this fixed eventually...

Robert, do you know if there's any intention to add it to wayland protocol or create a mutter extensions for it?
Thanks.

Flags: needinfo?(robert.mader)

(In reply to Kai Mast from comment #23)

Is there an associated Mutter bug for this? Would love to see this fixed eventually...

https://gitlab.gnome.org/GNOME/mutter/-/issues/1258

From the Mutter side there's nobody actively working on it ATM - see also https://bugzilla.mozilla.org/show_bug.cgi?id=1621261#c4 and following. If someone came up with a protocol proposal that does not break security assumptions we'd be open for it for sure. Note that always-on-top behaviour can be activated with two clicks already - not perfect, but hopefully an acceptable trade-off for the moment.

Flags: needinfo?(robert.mader)
See Also: → 1745656
See Also: → wayland-pip

Can confirm still an issue in Fedora 36. Looks like osuper + right-click + Always on top is one way to fix, but you have to do it every time. Not ideal.

There's a GNOME extension called PiP on top that gets around this Wayland limitation with specific support for Firefox.

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

Attachment

General

Created:
Updated:
Size: