X backend clipboard properly negotiates data type with owner

The clipboard API has been changed to allow an application to
accept a number of different mime types, and the X backend will now
check the accepted types list against the owner's TARGETS list and
choose the best one.
This commit is contained in:
2023-03-29 02:55:12 -04:00
parent 0aede3502b
commit 39dc09bc4a
3 changed files with 146 additions and 20 deletions

View File

@@ -305,6 +305,7 @@ func (window *window) Paste (callback func (data.Data, error), accept ...data.Mi
window.selectionRequest = window.newSelectionRequest (
selectionAtom, propertyAtom, callback, accept...)
if !window.selectionRequest.open() { window.selectionRequest = nil }
return
}