From feab40981772fdbc9b7efd013773652806bdb308 Mon Sep 17 00:00:00 2001 From: Locria Cyber <74560659+locriacyber@users.noreply.github.com> Date: Wed, 23 Feb 2022 23:36:47 +0800 Subject: [PATCH 1/3] Add flags to motion and buttons --- include/qubes-gui-protocol.h | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/include/qubes-gui-protocol.h b/include/qubes-gui-protocol.h index ba681e6..f1c3f4f 100644 --- a/include/qubes-gui-protocol.h +++ b/include/qubes-gui-protocol.h @@ -35,7 +35,7 @@ typedef unsigned __int32 uint32_t; /* version of protocol described in this file, used as gui-daemon protocol * version; specific agent defines own version which them support */ #define QUBES_GUID_PROTOCOL_VERSION_MAJOR 1 -#define QUBES_GUID_PROTOCOL_VERSION_MINOR 3 +#define QUBES_GUID_PROTOCOL_VERSION_MINOR 4 #define QUBES_GUID_PROTOCOL_VERSION (QUBES_GUID_PROTOCOL_VERSION_MAJOR << 16 | QUBES_GUID_PROTOCOL_VERSION_MINOR) //arbitrary @@ -99,7 +99,15 @@ enum { MSG_WMCLASS, MSG_WINDOW_DUMP, MSG_CURSOR, - MSG_MAX + MSG_MAX, + MSG_KEYPRESS2, + MSG_BUTTON2, +}; +enum { + FLAG_KEYPRESS_REPEAT=0b1, +}; +enum { + FLAG_BUTTON_EMULATED=0b1, }; /* VM -> Dom0, Dom0 -> VM */ struct msg_map_info { @@ -130,6 +138,15 @@ struct msg_keypress { uint32_t keycode; }; /* Dom0 -> VM */ +struct msg_keypress2 { + uint32_t type; + uint32_t x; + uint32_t y; + uint32_t state; + uint32_t keycode; + uint32_t flags; +}; +/* Dom0 -> VM */ struct msg_button { uint32_t type; uint32_t x; @@ -138,6 +155,14 @@ struct msg_button { uint32_t button; }; /* Dom0 -> VM */ +struct msg_button2 { + uint32_t type; + uint32_t x; + uint32_t y; + uint32_t state; + uint32_t button; + uint32_t flags; +};/* Dom0 -> VM */ struct msg_motion { uint32_t x; uint32_t y; From e129a444857bba4e1add1c79004f83438bc30c94 Mon Sep 17 00:00:00 2001 From: Locria Cyber <74560659+locriacyber@users.noreply.github.com> Date: Wed, 23 Feb 2022 23:41:23 +0800 Subject: [PATCH 2/3] Bump version --- version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version b/version index 627a3f4..4d0dcda 100644 --- a/version +++ b/version @@ -1 +1 @@ -4.1.1 +4.1.2 From 1f6be98f8dfdb44b0134646daec3405547fd303b Mon Sep 17 00:00:00 2001 From: Locria Cyber <74560659+locriacyber@users.noreply.github.com> Date: Thu, 24 Feb 2022 01:21:38 +0800 Subject: [PATCH 3/3] Add xinput motion events too --- include/qubes-gui-protocol.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/include/qubes-gui-protocol.h b/include/qubes-gui-protocol.h index f1c3f4f..39ab929 100644 --- a/include/qubes-gui-protocol.h +++ b/include/qubes-gui-protocol.h @@ -102,6 +102,7 @@ enum { MSG_MAX, MSG_KEYPRESS2, MSG_BUTTON2, + MSG_MOTION2, }; enum { FLAG_KEYPRESS_REPEAT=0b1, @@ -109,6 +110,9 @@ enum { enum { FLAG_BUTTON_EMULATED=0b1, }; +enum { + FLAG_MOTION_EMULATED=0b1, +}; /* VM -> Dom0, Dom0 -> VM */ struct msg_map_info { uint32_t transient_for; @@ -162,7 +166,8 @@ struct msg_button2 { uint32_t state; uint32_t button; uint32_t flags; -};/* Dom0 -> VM */ +}; +/* Dom0 -> VM */ struct msg_motion { uint32_t x; uint32_t y; @@ -170,6 +175,14 @@ struct msg_motion { uint32_t is_hint; }; /* Dom0 -> VM */ +struct msg_motion2 { + uint32_t x; + uint32_t y; + uint32_t state; + uint32_t is_hint; + uint32_t flags; +}; +/* Dom0 -> VM */ struct msg_crossing { uint32_t type; uint32_t x;