From cca3c953dae05493f7a076b6d8b1de6bf22d56f9 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Sat, 1 Jan 2022 23:59:20 +0100 Subject: [PATCH] Enable virtual finger only on left click The pinch-to-zoom feature must only be enabled with Ctrl+left_click. --- app/src/input_manager.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/input_manager.c b/app/src/input_manager.c index dfd78484..34bab246 100644 --- a/app/src/input_manager.c +++ b/app/src/input_manager.c @@ -783,8 +783,9 @@ input_manager_process_mouse_button(struct input_manager *im, // In other words, the center of the rotation/scaling is the center of the // screen. #define CTRL_PRESSED (SDL_GetModState() & (KMOD_LCTRL | KMOD_RCTRL)) - if ((down && !im->vfinger_down && CTRL_PRESSED) - || (!down && im->vfinger_down)) { + if (event->button == SDL_BUTTON_LEFT && + ((down && !im->vfinger_down && CTRL_PRESSED) || + (!down && im->vfinger_down))) { struct sc_point mouse = screen_convert_window_to_frame_coords(im->screen, event->x, event->y);