diff mbox series

sdl2: Add extra mouse buttons

Message ID CAPDU3-+Q+7zC8e9pmXuaMqmefP_9jrg4kEFMH_=gQZLGskHkjA@mail.gmail.com
State New
Headers show
Series sdl2: Add extra mouse buttons | expand

Commit Message

Darrell Walisser Dec. 6, 2020, 6:16 p.m. UTC
Sends mouse buttons 4 and 5, aka "SIDE" and "EXTRA" to the guest

Signed-off-by: Darrell Walisser <darrell.walisser@gmail.com>
---
 ui/sdl2.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Gerd Hoffmann Dec. 7, 2020, 10:25 a.m. UTC | #1
On Sun, Dec 06, 2020 at 01:16:30PM -0500, Darrell Walisser wrote:
> Sends mouse buttons 4 and 5, aka "SIDE" and "EXTRA" to the guest
> 
> Signed-off-by: Darrell Walisser <darrell.walisser@gmail.com>
> ---
>  ui/sdl2.c | 2 ++
>  1 file changed, 2 insertions(+)

> +        [INPUT_BUTTON_SIDE]       = SDL_BUTTON(SDL_BUTTON_X1),
> +        [INPUT_BUTTON_EXTRA]      = SDL_BUTTON(SDL_BUTTON_X2)

Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann Dec. 10, 2020, 12:22 p.m. UTC | #2
Hi,

> @@ -275,6 +275,8 @@ static void sdl_send_mouse_event(struct
> sdl2_console *scon, int dx, int dy,

Patch is corrupted (mailer wrapped the line).
Can you resend with git send-email?

thanks,
  Gerd
diff mbox series

Patch

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;