mpv icon indicating copy to clipboard operation
mpv copied to clipboard

Option to force mpv on wayland to still present even if minimised

Open CounterPillow opened this issue 2 years ago • 4 comments

On Wayland, mpv does not present new frames if it is minimised or otherwise not visible. This is usually what users will want, but in the case of someone capturing an mpv window with pipewire, mpv doesn't know that it can still be seen through pipewire even when minimised.

Expected behavior of the wanted feature

An option to force mpv to render new frames regardless of whether it is hidden/minimised or not.

Alternative behavior of the wanted feature

I don't know how this works, but presumably the compositor could also tell the application that it's still being looked at if pipewire is capturing the window

CounterPillow avatar Nov 11 '22 10:11 CounterPillow

This does sound like it would be the responsibility of the compositor (assuming mpv uses a standard way of detecting visibility and not some hack) so any issue here would be a failing of pipewire and/or your compositor. maybe @Dudemanguy can bring some light into the dark here

sfan5 avatar Nov 12 '22 14:11 sfan5

There is no standard way of detecting visibility nor any sort of way to indicate the screen is being captured (yes, really) on the client side. What a compositor could do is simply continue to send frame callbacks if an application is being captured by pipewire instead of throttling it, but I'm not sure if anyone actually does that (this feature request would indicate the answer to that is "no").

Dudemanguy avatar Nov 12 '22 15:11 Dudemanguy

I think there is a proposal to fix this:

https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/99

eszlari avatar Nov 13 '22 03:11 eszlari

Yes, that protocol would be really nice to have but as you can tell it got stalled (there's an old draft PR for mpv lying around). Hopefully Valve decides that they really want this one day; that seems to get things rolling. My personal preference would be for that to act as a visibility hint but there's some discussion in there saying that it wouldn't (makes it much less useful imo but w/e).

Dudemanguy avatar Nov 13 '22 03:11 Dudemanguy