@@ -124,7 +124,7 @@ int16_t scale_y_coordinate(int screen_from, int screen_to, device_t *state) {
124124 return ((state -> pointer_y - from -> border .top ) * MAX_SCREEN_COORD ) / size_from ;
125125}
126126
127- void switch_screen (
127+ void switch_to_another_pc (
128128 device_t * state , output_t * output , int output_to , int direction ) {
129129 uint8_t * mouse_park_pos = & state -> config .output [state -> active_output ].mouse_park_pos ;
130130
@@ -135,12 +135,12 @@ void switch_screen(
135135 mouse_report_t hidden_pointer = {.y = mouse_y , .x = MAX_SCREEN_COORD };
136136
137137 output_mouse_report (& hidden_pointer , state );
138- switch_output (state , output_to );
138+ set_active_output (state , output_to );
139139 state -> pointer_x = (direction == LEFT ) ? MAX_SCREEN_COORD : MIN_SCREEN_COORD ;
140140 state -> pointer_y = scale_y_coordinate (output -> number , 1 - output -> number , state );
141141}
142142
143- void switch_desktop_macos (device_t * state , int direction ) {
143+ void switch_virtual_desktop_macos (device_t * state , int direction ) {
144144 /* Fix for MACOS: Send relative mouse movement here, one or two pixels in the
145145 direction of movement, BEFORE absolute report sets X to 0 */
146146 uint16_t move = (direction == LEFT ) ? - MACOS_SWITCH_MOVE_X : MACOS_SWITCH_MOVE_X ;
@@ -151,10 +151,10 @@ void switch_desktop_macos(device_t *state, int direction) {
151151 output_mouse_report (& move_relative_one , state );
152152}
153153
154- void switch_desktop (device_t * state , output_t * output , int new_index , int direction ) {
154+ void switch_virtual_desktop (device_t * state , output_t * output , int new_index , int direction ) {
155155 switch (output -> os ) {
156156 case MACOS :
157- switch_desktop_macos (state , direction );
157+ switch_virtual_desktop_macos (state , direction );
158158 break ;
159159
160160 case WINDOWS :
@@ -206,16 +206,16 @@ void check_screen_switch(const mouse_values_t *values, device_t *state) {
206206 if (state -> mouse_buttons )
207207 return ;
208208
209- switch_screen (state , output , 1 - state -> active_output , direction );
209+ switch_to_another_pc (state , output , 1 - state -> active_output , direction );
210210 }
211211 /* If here, this output has multiple desktops and we are not on the main one */
212212 else
213- switch_desktop (state , output , output -> screen_index - 1 , direction );
213+ switch_virtual_desktop (state , output , output -> screen_index - 1 , direction );
214214 }
215215
216216 /* We want to jump away from the other computer, only possible if there is another screen to jump to */
217217 else if (output -> screen_index < output -> screen_count )
218- switch_desktop (state , output , output -> screen_index + 1 , direction );
218+ switch_virtual_desktop (state , output , output -> screen_index + 1 , direction );
219219}
220220
221221void extract_report_values (uint8_t * raw_report , device_t * state , mouse_values_t * values , hid_interface_t * iface ) {
0 commit comments