[Spice-commits] spice/enums.h spice/vd_agent.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Aug 19 14:13:50 UTC 2020


 spice/enums.h    |    8 +++++++-
 spice/vd_agent.h |    2 ++
 2 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit cbe7b2c28543f4c5e57d1db1b753b73a64104162
Author: SimonP <simonp.git at gmail.com>
Date:   Thu Jun 18 16:25:42 2020 +0200

    protocol: Add support for side mouse buttons
    
    Side mouse buttons currently do not exist in the protocol, causing them
    to be inexplicably ignored by VMs in virt-manager and such. This lays
    the groundwork for fixing that issue.
    
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/spice/enums.h b/spice/enums.h
index d46491f..5c9a54c 100644
--- a/spice/enums.h
+++ b/spice/enums.h
@@ -336,6 +336,8 @@ typedef enum SpiceMouseButton {
     SPICE_MOUSE_BUTTON_RIGHT,
     SPICE_MOUSE_BUTTON_UP,
     SPICE_MOUSE_BUTTON_DOWN,
+    SPICE_MOUSE_BUTTON_SIDE,
+    SPICE_MOUSE_BUTTON_EXTRA,
 
     SPICE_MOUSE_BUTTON_ENUM_END
 } SpiceMouseButton;
@@ -344,8 +346,12 @@ typedef enum SpiceMouseButtonMask {
     SPICE_MOUSE_BUTTON_MASK_LEFT = (1 << 0),
     SPICE_MOUSE_BUTTON_MASK_MIDDLE = (1 << 1),
     SPICE_MOUSE_BUTTON_MASK_RIGHT = (1 << 2),
+    SPICE_MOUSE_BUTTON_MASK_UP = (1 << 3),
+    SPICE_MOUSE_BUTTON_MASK_DOWN = (1 << 4),
+    SPICE_MOUSE_BUTTON_MASK_SIDE = (1 << 5),
+    SPICE_MOUSE_BUTTON_MASK_EXTRA = (1 << 6),
 
-    SPICE_MOUSE_BUTTON_MASK_MASK = 0x7
+    SPICE_MOUSE_BUTTON_MASK_MASK = 0x7F
 } SpiceMouseButtonMask;
 
 typedef enum SpiceCursorType {
diff --git a/spice/vd_agent.h b/spice/vd_agent.h
index bcc3915..baade9a 100644
--- a/spice/vd_agent.h
+++ b/spice/vd_agent.h
@@ -230,6 +230,8 @@ typedef struct SPICE_ATTR_PACKED VDAgentDisplayConfig {
 #define VD_AGENT_RBUTTON_MASK (1 << 3)
 #define VD_AGENT_UBUTTON_MASK (1 << 4)
 #define VD_AGENT_DBUTTON_MASK (1 << 5)
+#define VD_AGENT_SBUTTON_MASK (1 << 6)
+#define VD_AGENT_EBUTTON_MASK (1 << 7)
 
 typedef struct SPICE_ATTR_PACKED VDAgentMouseState {
     uint32_t x;


More information about the Spice-commits mailing list