aboutsummaryrefslogtreecommitdiff
path: root/ui/sdl2.c
diff options
context:
space:
mode:
authorDarrell Walisser <darrell.walisser@gmail.com>2020-12-10 14:33:06 +0000
committerGerd Hoffmann <kraxel@redhat.com>2020-12-11 08:06:40 +0100
commit2951106143f6cf20b3a0e4f2078721503fe6418a (patch)
tree4de17cb94a4384eb834fe55554493af44d47488b /ui/sdl2.c
parent947191b4312a547621566d77d7b922d9e13bb63d (diff)
sdl2: Add extra mouse buttons
Allows guest to receive mouse buttons 4 and 5, aka "SIDE" button and "EXTRA" button Signed-off-by: Darrell Walisser <darrell.walisser@gmail.com> Message-id: GNUALCfDBqhCUvLwBNJaKqxcPewMtlqCnixk8xTrgI@ubuntu Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/sdl2.c')
-rw-r--r--ui/sdl2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/sdl2.c b/ui/sdl2.c
index 189d26e2a9..a578017268 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -275,6 +275,8 @@ static void sdl_send_mouse_event(struct sdl2_console *scon, int dx, int dy,
[INPUT_BUTTON_LEFT] = SDL_BUTTON(SDL_BUTTON_LEFT),
[INPUT_BUTTON_MIDDLE] = SDL_BUTTON(SDL_BUTTON_MIDDLE),
[INPUT_BUTTON_RIGHT] = SDL_BUTTON(SDL_BUTTON_RIGHT),
+ [INPUT_BUTTON_SIDE] = SDL_BUTTON(SDL_BUTTON_X1),
+ [INPUT_BUTTON_EXTRA] = SDL_BUTTON(SDL_BUTTON_X2)
};
static uint32_t prev_state;