mirror of
https://github.com/swaywm/sway.git
synced 2025-02-07 08:30:46 +00:00
Update cursor.c
This commit is contained in:
parent
9932197d16
commit
094c0004a6
|
@ -407,6 +407,11 @@ static void handle_pointer_motion_relative(
|
|||
struct wl_listener *listener, void *data) {
|
||||
struct sway_cursor *cursor = wl_container_of(listener, cursor, motion);
|
||||
struct wlr_pointer_motion_event *e = data;
|
||||
|
||||
struct sway_input_device *sid = input_sway_device_from_wlr(e->device);
|
||||
struct input_config *ic = sid ? input_device_get_config(sid) : NULL;
|
||||
float sensitivity = (ic && ic->sensitivity != FLT_MIN) ? ic->sensitivity : 1.0f;
|
||||
|
||||
cursor_handle_activity_from_device(cursor, &e->pointer->base);
|
||||
|
||||
pointer_motion(cursor, e->time_msec, &e->pointer->base, e->delta_x,
|
||||
|
@ -418,11 +423,6 @@ static void handle_pointer_motion_absolute(
|
|||
struct sway_cursor *cursor =
|
||||
wl_container_of(listener, cursor, motion_absolute);
|
||||
struct wlr_pointer_motion_absolute_event *event = data;
|
||||
|
||||
struct sway_input_device *sid = input_sway_device_from_wlr(event->device);
|
||||
struct input_config *ic = sid ? input_device_get_config(sid) : NULL;
|
||||
float sensitivity = (ic && ic->sensitivity != FLT_MIN) ? ic->sensitivity : 1.0f;
|
||||
|
||||
cursor_handle_activity_from_device(cursor, &event->pointer->base);
|
||||
|
||||
double lx, ly;
|
||||
|
|
Loading…
Reference in a new issue