Wayland and Firefox Picture-in-Picture

Hi,

This topic is not specifically meant for Fedora (41), but also other distro’s so maybe this is not the best place to open this, but you never know.

For some time, Firefox has had a Picture-in-Picture (Pip) mode, which I use a lot when browsing. I know this functionality has had some issues in the past, but most of them are at least 2 years old. I can’t seem to find any reports about the issue described below specifically. These issues arise when I use Intel Integrated Graphics and Nvidia Graphics cards.

On multiple distro’s I run into the issue that PiP does not remember the previous position of the PiP-window (i.e. bottom left corner). When I place the PiP window in the corner of the screen, and exit PiP (so it returns to its source), then open PiP again, I have to place it again in the right position. The strange this is this happens only on Wayland. It does not matter if it is a system using Nvidia, or Intel graphics cards and this issue arises on Ubuntu and Fedora (40 & 41).
When I use the X11 window manager or xWayland, it works fine, remembers the previous position and always stays on top of other windows.

I am wondering if anybody also runs in these issues and if they found a fix.
The specs of my PC are:
Fedora 41 Workstation w/ Gnome
Intel i9700K
Nvidia 2080 RTX
16GB RAM
Currently running Fedora 41 but before I used Fedora 40 and Ubuntu 22.04.

The specs of some of the laptops I use:
Ubuntu 22.04 LTS w/ Gnome
Lenovo Ideapad G70-80
Intel i5-5200U
Intel HD Graphics
8 GB RAM

Lenovo Thinkpad T580
Fedora 40 Workstation w/ Gnome
Intel i7-8650U
Intel UHD Graphics 620
16 GB RAM

Looking forward to your reply.

Regards,

Pim

Same here but I don’t have any solution.

Other than installing base-x and gnome-sessions-xsession to use X11 or adding MOZ_ENABLE_WAYLAND=0 to /etc/environment to force the use of xWayland I haven’t found a workaround either.
Adding the line to /etc/environment works on my systems with Intel graphics, but makes Firefox crash when exiting PiP on my system with a Nvidia GPU.

Added f41, firefox, gnome, wayland, workstation

This is not about PiP but generally Windows being able to place themselves at a certain place at all.

There is a Wayland portal for that and lots of discussions. Not sure it it is ready.

It will be in KDE faster than in GNOME, I suppose