mirror of
https://github.com/mpv-player/mpv.git
synced 2026-06-06 20:10:30 +00:00
This uses the update_data request for clipboard backends that require it. When clipboard monitoring is disabled, the backends will no longer fetch data when it detects data change, and will now only do that when receiving the update_data request. The client now needs to run this command to update the clipboard content, otherwise the property value is outdated. This makes sure that applications that depend on "paste once" behavior work correctly. This command runs in a separate worker thread so that it can be used as a "blocking" way to update clipboard until the update notification arrives without blocking the playback core. It accepts a maximum timeout parameter. This uses the existing mp_cancel mechanism to make sure this command can be aborted and the worker threads will not stall the player too much when quitting mpv. For backends that do not support update_data, this command does nothing.
3 lines
135 B
Plaintext
3 lines
135 B
Plaintext
add `update-clipboard` command
|
|
change `clipboard` property to require `update-clipboard` command when clipboard monitoring is disabled
|