mpv: add patch to fix clipboard polling on wayland

Upstream backport: https://github.com/mpv-player/mpv/pull/16140
This commit is contained in:
dogknowsnx 2025-07-23 13:11:32 +02:00 committed by Đoàn Trần Công Danh
parent d30bbbc285
commit 74c7d2521e
2 changed files with 17 additions and 1 deletions

View file

@ -0,0 +1,16 @@
https://github.com/mpv-player/mpv/pull/16140
--- a/player/clipboard/clipboard-wayland.c
+++ b/player/clipboard/clipboard-wayland.c
@@ -348,6 +348,12 @@ static bool clipboard_wayland_dispatch_events(struct clipboard_wayland_priv *wl,
if (fds[1].revents & POLLIN)
return false;
+ if (fds[2].revents & (POLLERR | POLLHUP | POLLNVAL))
+ destroy_offer(wl->selection_offer);
+
+ if (fds[3].revents & (POLLERR | POLLHUP | POLLNVAL))
+ destroy_offer(wl->primary_selection_offer);
+
if (fds[2].revents & POLLIN)
get_selection_data(wl, wl->selection_offer, false);

View file

@ -1,7 +1,7 @@
# Template file for 'mpv' # Template file for 'mpv'
pkgname=mpv pkgname=mpv
version=0.40.0 version=0.40.0
revision=2 revision=3
build_style=meson build_style=meson
configure_args="-Dcdda=enabled -Ddvbin=enabled -Ddvdnav=enabled configure_args="-Dcdda=enabled -Ddvbin=enabled -Ddvdnav=enabled
-Dlibmpv=true -Dcplugins=enabled -Dlibmpv=true -Dcplugins=enabled