@@ -1412,10 +1412,10 @@ void WaylandThread::_wl_pointer_on_motion(void *data, struct wl_pointer *wl_poin
14121412 PointerData &pd = ss->pointer_data_buffer ;
14131413
14141414 // TODO: Scale only when sending the Wayland message.
1415- pd.position .x = wl_fixed_to_int (surface_x);
1416- pd.position .y = wl_fixed_to_int (surface_y);
1415+ pd.position .x = wl_fixed_to_double (surface_x);
1416+ pd.position .y = wl_fixed_to_double (surface_y);
14171417
1418- pd.position = scale_vector2i (pd. position , window_state_get_scale_factor (ws) );
1418+ pd.position *= window_state_get_scale_factor (ws);
14191419
14201420 pd.motion_time = time;
14211421}
@@ -1528,7 +1528,7 @@ void WaylandThread::_wl_pointer_on_frame(void *data, struct wl_pointer *wl_point
15281528 mm->set_position (pd.position );
15291529 mm->set_global_position (pd.position );
15301530
1531- Vector2i pos_delta = pd.position - old_pd.position ;
1531+ Vector2 pos_delta = pd.position - old_pd.position ;
15321532
15331533 if (old_pd.relative_motion_time != pd.relative_motion_time ) {
15341534 uint32_t time_delta = pd.relative_motion_time - old_pd.relative_motion_time ;
@@ -1645,7 +1645,7 @@ void WaylandThread::_wl_pointer_on_frame(void *data, struct wl_pointer *wl_point
16451645
16461646 // We have to set the last position pressed here as we can't take for
16471647 // granted what the individual events might have seen due to them not having
1648- // a garaunteed order.
1648+ // a guaranteed order.
16491649 if (mb->is_pressed ()) {
16501650 pd.last_pressed_position = pd.position ;
16511651 }
@@ -2372,9 +2372,9 @@ void WaylandThread::_wp_tablet_tool_on_motion(void *data, struct zwp_tablet_tool
23722372
23732373 double scale_factor = window_state_get_scale_factor (ws);
23742374
2375- td.position .x = wl_fixed_to_int (x);
2376- td.position .y = wl_fixed_to_int (y);
2377- td.position = scale_vector2i (td. position , scale_factor) ;
2375+ td.position .x = wl_fixed_to_double (x);
2376+ td.position .y = wl_fixed_to_double (y);
2377+ td.position *= scale_factor;
23782378
23792379 td.motion_time = OS::get_singleton ()->get_ticks_msec ();
23802380}
@@ -2509,7 +2509,7 @@ void WaylandThread::_wp_tablet_tool_on_frame(void *data, struct zwp_tablet_tool_
25092509 mm->set_relative (td.position - old_td.position );
25102510 mm->set_relative_screen_position (mm->get_relative ());
25112511
2512- Vector2i pos_delta = td.position - old_td.position ;
2512+ Vector2 pos_delta = td.position - old_td.position ;
25132513 uint32_t time_delta = td.motion_time - old_td.motion_time ;
25142514 mm->set_velocity ((Vector2)pos_delta / time_delta);
25152515
0 commit comments