diff --git a/src/mouse.c b/src/mouse.c index 07b8318..0a35175 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -123,7 +123,10 @@ int16_t scale_y_coordinate(int screen_from, int screen_to, device_t *state) { void switch_screen( device_t *state, output_t *output, int new_x, int output_from, int output_to, int direction) { - mouse_report_t hidden_pointer = {.y = MIN_SCREEN_COORD, .x = MAX_SCREEN_COORD}; + unsigned mouse_y = (MOUSE_PARKING_POSITION == 0) ? MIN_SCREEN_COORD : /*TOP*/ + (MOUSE_PARKING_POSITION == 1) ? MAX_SCREEN_COORD : /*BOTTOM*/ + state->mouse_y; /*PREVIOUS*/ + mouse_report_t hidden_pointer = {.y = mouse_y, .x = MAX_SCREEN_COORD}; output_mouse_report(&hidden_pointer, state); switch_output(state, output_to); diff --git a/src/user_config.h b/src/user_config.h index aa45b76..d7ab84a 100644 --- a/src/user_config.h +++ b/src/user_config.h @@ -66,6 +66,20 @@ /* Mouse acceleration */ #define ENABLE_ACCELERATION 1 + +/**================================================== * + * =========== Mouse General Settings ============= * + * ================================================== * + * + * MOUSE_PARKING_POSITION: [0, 1, 2 ] 0 means park mouse on TOP + * 1 means park mouse on BOTTOM + * 2 means park mouse on PREVIOUS position + * + * */ + +#define MOUSE_PARKING_POSITION 0 + + /**================================================== * * ============== Screensaver Config ============== * * ================================================== *