Firefox KDE PiP video doesn't stay on top

Try this one: https://www.reddit.com/r/kde/comments/osjt3p/firefox_wayland_pip_workaround_or_how_i_learned/

A lot of public Redlib instances seem to be down or not working properly at the moment (including the Garuda one), so that is unfortunately a link to actual Reddit. But here is the body of the post if it helps:

Firefox Wayland PiP workaround or How I Learned to Stop Clicking Keep Above and Love Window Rules

I’m not 100% sure if this is everyone’s experience, but when running Firefox with Wayland (not as an xwayland window), Picture-in-Picture windows don’t stay above by default.

If you are similarly afflicted, the workaround is literally ten clicks away (assuming you have a scroll wheel) using Window Rules. You could create and fill the rule manually, but now that I’ve mentioned the ten clicks thing I’m committed to only using clicks in this quick how-to.

Step 1: Right click an open Picture-in-Picture window. In the context menu, select “More Actions” → “Configure Special Window Settings…”. This will populate most of the window settings for you.

Step 2: Click “Add Property…” and select “Window title”. The newly added row’s text field should read “Picture-in-Picture”. Change the dropdown option from “Unimportant” to “Exact Match”. (All PiP windows in Firefox use this title and by making it Exact Match the rule shouldn’t affect any other Firefox windows.)

Step 3: Click “Add Property…” again and this time select “Keep above other windows”. The dropdown in the newly added row should be set to “Apply Initially”. Select the “Yes” radio button if it isn’t already.

Step 4: Click “OK”. That’s it. No more manually setting Keep Above every time you open a PiP.

The window settings should look like this by the end

Addendum: I’ve never bothered with Window Rules before today. In a few minutes of experimentation I implemented a workaround for an inconvenience that has been plaguing me since I switched to Wayland as of Plasma 5.22.

With my uneducated, ADHD-addled, end-user self being able to achieve this so easily and with no prior experience with Window Rules or having read any its documentation, all my praise goes to this powerful and easy-to-use feature that exists in KDE/Kwin/Plasma (and all those involved in its creation and maintenance).

The post is a few years old, but appears to be still working for people according to the comments.

u/eddyizm 12d ago

3 years later and this is still the fix on Plasma 6.2.0

2 Likes