Firefox KDE PiP video doesn't stay on top

Good day, does anyone know how to create a rule to stay on top? I tried but was saved for the entire Firefox. Cannot get a separate name for the PiP window. Regardless if i use “firefox” or “firefox firefox” does always the same.

Also to prevent a certain someone, please don’t indicate the known old reddit post, doesn’t work today.

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

Im not sure that site you need it for but for at least YT you can kinda get it to work although its manual.

Using Enhancer for Youtube an using its “pop out” function
Right clicking on the title bar and going to more action an keep above others.

You might be able to pump your video into mpv and set it to a player you don’t use an set that to be always on top but that seems like a lot of work.

1 Like

Please test it your self before you post other site solutions. Told you doesn’t work. Anyway solve it my self and here what the above forum gets wrong:

  1. Plasma 6 doesn’t save settings after closing window, when they come from right click on the window. You have to go to the KDE Settings -> Window Management -> Window Rules and start a new rule. Then down bellow there is a choice of Detect Window Properties. With that you can target any window and that will auto fill any live property including real name or position coordinates.

  2. Both Window Class: firefox and Window Title: picture-in-picture are needed, both with Exact Much.

  3. The real Window Title is translated in your system’s language, it will not be always english and will not work in english. Mine it’s not picture-in-picture for example.

  4. Then you add whatever settings you want, some they have an extra YES tick and all have the Forced choice in a side window. Only then both Keep Above Other Windows and Position work correctly for me.

This extension’s pop up window doesn’t follow other tabs or apps and your screen in general.

No need, I do not have this issue. I am perfectly happy for you to do the testing on this one. :wink:

You did not tell anyone anything. Your opening post has basically no information about what you tried or did not try.

Besides, it seems it does work–you went on to describe the exact same solution from the Reddit post, except you opened the settings menu a different way.

Anyway, glad to hear the same old fix is still working fine after all these years, and that your PiP windows are now behaving according to your preference.

2 Likes

You my friend need to be more respectful towards our Garuda forum moderators. @BluishHumility is one of the forum’s most dedicated and helpful volunteers with well over 500 solutions to his credit. When I check the profile of member @artivision , I see you have been a forum member over 3 years, but in all that time you have not helped even one forum member find a solution to their problem.

You reek of entitlement, and frankly your attitude sucks. @BluishHumility is probably the most polite assistant on our forum, so he would never tear a strip off another forum member for being rude. Myself not so much.

Don’t ever cop attitude towards our forum moderators, as you paid no membership fees here so you are not entitled act like a spoiled little brat towards our forum staff.

I generally send spoiled brats that are acting up for a time out. So, enjoy some quiet time for a while. In the meantime you can take your antics and requests for assistance to reddit for the next little while.

Buh, by, now. :wave:

4 Likes