[Spice-commits] 2 commits - spice/vd_agent.h
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Mar 6 08:25:16 UTC 2020
spice/vd_agent.h | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 045a6978d6dbbf7046affc5c321fa8177c8cce56
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date: Thu Mar 21 17:18:52 2019 +0100
vdagent: introduce VD_AGENT_CAP_CLIPBOARD_GRAB_SERIAL
When this capability is negoticated by both the client & the agent,
the clipboard grab messages have an associated serial counter.
The serial is reset to 0 upon client connection.
The counter is increment by 1 on each grab message, by both sides.
The sender of the message with the highest serial should be the
clipboard grab owner, and the current session serial should be
updated.
If a lower serial than the current session serial is received, the
grab should be discarded.
Whenever two grabs share the same serial, the one coming from the
client should have a higher priority and the client should gain the
clipboard ownership.
No special treatement is done for the unlikely case of overflowing the
counter. It may temporarily inverse the priority, until both side have
overflown and/or synchronized.
Note: this mechanism isn't aiming at making "the most recent" (as in
time) side gaining the ownership. One side sending subsequent grab
messages earlier will likely take the ownership over a side sending a
single message simultaneously the other way. It only clears the
situation where both side believe that the other is the current
clipboard owner, by having a global ordering and priority in case of
serial conflict.
Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
Acked-by: Victor Toso <victortoso at redhat.com>
diff --git a/spice/vd_agent.h b/spice/vd_agent.h
index dd947af..51889fc 100644
--- a/spice/vd_agent.h
+++ b/spice/vd_agent.h
@@ -231,6 +231,9 @@ typedef struct SPICE_ATTR_PACKED VDAgentClipboardGrab {
#if 0 /* VD_AGENT_CAP_CLIPBOARD_SELECTION */
uint8_t selection;
uint8_t __reserved[sizeof(uint32_t) - 1 * sizeof(uint8_t)];
+#endif
+#if 0 /* VD_AGENT_CAP_CLIPBOARD_GRAB_SERIAL */
+ uint32_t serial;
#endif
uint32_t types[0];
} VDAgentClipboardGrab;
@@ -304,6 +307,7 @@ enum {
VD_AGENT_CAP_FILE_XFER_DETAILED_ERRORS,
VD_AGENT_CAP_GRAPHICS_DEVICE_INFO,
VD_AGENT_CAP_CLIPBOARD_NO_RELEASE_ON_REGRAB,
+ VD_AGENT_CAP_CLIPBOARD_GRAB_SERIAL,
VD_AGENT_END_CAP,
};
commit 4f397d695dc4bfef0334d617d2f7aa7866d07cef
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date: Thu Mar 21 16:57:46 2019 +0100
vdagent: introduce VD_AGENT_CAP_CLIPBOARD_NO_RELEASE_ON_REGRAB
This capability means the peer will not send a release event between
two subsequent grabs. This helps with interaction issues with
clipboard managers which can be worked around by time-based filters at
this point. With this capability, there is no need for such filter.
Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
Acked-by: Victor Toso <victortoso at redhat.com>
diff --git a/spice/vd_agent.h b/spice/vd_agent.h
index 84c8647..dd947af 100644
--- a/spice/vd_agent.h
+++ b/spice/vd_agent.h
@@ -303,6 +303,7 @@ enum {
VD_AGENT_CAP_FILE_XFER_DISABLED,
VD_AGENT_CAP_FILE_XFER_DETAILED_ERRORS,
VD_AGENT_CAP_GRAPHICS_DEVICE_INFO,
+ VD_AGENT_CAP_CLIPBOARD_NO_RELEASE_ON_REGRAB,
VD_AGENT_END_CAP,
};
More information about the Spice-commits
mailing list