From 063d103dd6f959f6f1619f20e4e964a042c700ad Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Sun, 23 Jan 2022 21:30:30 +0100 Subject: [PATCH] Capture mouse on start for --hid-mouse If relative mode is enabled, capture the mouse immediately. --- app/src/screen.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/screen.c b/app/src/screen.c index 31c63092..c62920bc 100644 --- a/app/src/screen.c +++ b/app/src/screen.c @@ -707,6 +707,11 @@ sc_screen_update_frame(struct sc_screen *screen) { screen->has_frame = true; // this is the very first frame, show the window sc_screen_show_initial_window(screen); + + if (sc_screen_is_relative_mode(screen)) { + // Capture mouse on start + sc_screen_capture_mouse(screen, true); + } } sc_screen_render(screen, false);