diff options
author | SimonP <simonp.git@gmail.com> | 2020-06-18 16:25:42 +0200 |
---|---|---|
committer | Frediano Ziglio <freddy77@gmail.com> | 2020-08-19 15:11:38 +0100 |
commit | cbe7b2c28543f4c5e57d1db1b753b73a64104162 (patch) | |
tree | 43875da7c91b8e65e277817ced4853231b6abf55 | |
parent | 11af68a51396dd9344048184d1ed90c0d961097e (diff) |
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@redhat.com>
-rw-r--r-- | spice/enums.h | 8 | ||||
-rw-r--r-- | spice/vd_agent.h | 2 |
2 files changed, 9 insertions, 1 deletions
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; |