[gnome-remote-desktop] session-vnc: Add API to set clipboard text on client
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-remote-desktop] session-vnc: Add API to set clipboard text on client
- Date: Fri, 5 Feb 2021 17:07:07 +0000 (UTC)
commit 6b027ad91a484b2d06780cbb1d15b316c0e66e5c
Author: Pascal Nowack <Pascal Nowack gmx de>
Date: Sun Jan 17 17:46:18 2021 +0100
session-vnc: Add API to set clipboard text on client
In order to be able to set the clipboard text for a VNC client from the
VNC clipboard implementation, add an API which forwards the text to the
VNC client.
src/grd-session-vnc.c | 8 ++++++++
src/grd-session-vnc.h | 4 ++++
2 files changed, 12 insertions(+)
---
diff --git a/src/grd-session-vnc.c b/src/grd-session-vnc.c
index 74fc765..e208bbd 100644
--- a/src/grd-session-vnc.c
+++ b/src/grd-session-vnc.c
@@ -199,6 +199,14 @@ grd_session_vnc_move_cursor (GrdSessionVnc *session_vnc,
session_vnc->rfb_client->cursorWasMoved = TRUE;
}
+void
+grd_session_vnc_set_client_clipboard_text (GrdSessionVnc *session_vnc,
+ char *text,
+ int text_length)
+{
+ rfbSendServerCutText(session_vnc->rfb_screen, text, text_length);
+}
+
static void
maybe_queue_close_session_idle (GrdSessionVnc *session_vnc)
{
diff --git a/src/grd-session-vnc.h b/src/grd-session-vnc.h
index ee1f986..a532567 100644
--- a/src/grd-session-vnc.h
+++ b/src/grd-session-vnc.h
@@ -55,6 +55,10 @@ void grd_session_vnc_move_cursor (GrdSessionVnc *session_vnc,
int x,
int y);
+void grd_session_vnc_set_client_clipboard_text (GrdSessionVnc *session_vnc,
+ char *text,
+ int text_length);
+
int grd_session_vnc_get_stride_for_width (GrdSessionVnc *session_vnc,
int width);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]