mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.06k stars 2.88k forks source link

wayland: use wl->callback_surface for idle inhibitor creation #14209

Closed Dudemanguy closed 4 months ago

Dudemanguy commented 4 months ago

The idle inhibit protocol specifies that the compositor may ignore the idle inhibitor if the surface is occluded. In the case of vo_dmabuf_wayland, wl->surface corresponds to typical black bars when the video aspect ratio is different than the display's. So in many cases, wl->surface is actually occluded by wl->video_surface which sits above it. Change this so that the idle inhibitor is created on wl->callback_surface instead which is either wl->surface for the gpu VOs or wl->video_surface for vo_dmabuf_wayland. Fixes #14206.

github-actions[bot] commented 4 months ago

Download the artifacts for this pull request:

Windows * [mpv-i686-w64-mingw32](https://nightly.link/mpv-player/mpv/actions/artifacts/1525127392.zip) * [mpv-x86_64-w64-mingw32](https://nightly.link/mpv-player/mpv/actions/artifacts/1525132508.zip) * [mpv-x86_64-windows-msvc](https://nightly.link/mpv-player/mpv/actions/artifacts/1525144674.zip)
macOS * [mpv-macos-12-intel](https://nightly.link/mpv-player/mpv/actions/artifacts/1525122698.zip) * [mpv-macos-13-intel](https://nightly.link/mpv-player/mpv/actions/artifacts/1525128580.zip) * [mpv-macos-14-arm](https://nightly.link/mpv-player/mpv/actions/artifacts/1525121080.zip)
cniw commented 1 month ago

This PR make the idle inhibit protocol not working on KWin/KDE Plasma instead kwin 6.1.4 mpv v0.38.0-700.ge3f426aa4a

Should this fix on mpv or plasma codes? @Dudemanguy @philipl

currently i'm just revert this 1e1e365c18b4ab48a34228fa7dd46735f66f897f commit to make it works again.

llyyr commented 1 month ago

That sounds like a Plasma issue, but open a bug report first.