xclip multiple clipboard content types.

This commit is contained in:
Miroslav Šedivý
2021-01-28 22:51:55 +01:00
parent 4602f5f6cf
commit 2d11b4fa56
6 changed files with 112 additions and 18 deletions

View File

@ -16,5 +16,5 @@ func (h *MessageHandlerCtx) clipboardSet(session types.Session, payload *message
return nil
}
return h.desktop.WriteClipboard(payload.Text)
return h.desktop.ClipboardSetPlainText(payload.Text)
}

View File

@ -117,7 +117,7 @@ func (ws *WebSocketManagerCtx) Start() {
return
}
text, err := ws.desktop.ReadClipboard()
text, err := ws.desktop.ClipboardGetPlainText()
if err != nil {
ws.logger.Warn().Err(err).Msg("could not get clipboard content")
}