if ((output = edev->output))
{
- if (edev->mouse.x < output->x)
- edev->mouse.x = output->x;
- else if (edev->mouse.x >= (output->x + output->current_mode->width))
- edev->mouse.x = (output->x + output->current_mode->width - 1);
-
- if (edev->mouse.y < output->y)
- edev->mouse.y = output->y;
- else if (edev->mouse.y >= (output->y + output->current_mode->height))
- edev->mouse.y = (output->y + output->current_mode->height - 1);
+ if (edev->mouse.ix < output->x)
+ edev->mouse.dx = edev->mouse.ix = output->x;
+ else if (edev->mouse.ix >= (output->x + output->current_mode->width))
+ edev->mouse.dx =
+ edev->mouse.ix = (output->x + output->current_mode->width - 1);
+
+ if (edev->mouse.iy < output->y)
+ edev->mouse.dy = edev->mouse.iy = output->y;
+ else if (edev->mouse.iy >= (output->y + output->current_mode->height))
+ edev->mouse.dy = edev->mouse.iy = (output->y + output->current_mode->height - 1);
}
ev->window = (Ecore_Window)input->dev->window;
_device_modifiers_update(edev);
ev->modifiers = edev->xkb.modifiers;
- ev->x = edev->mouse.x;
- ev->y = edev->mouse.y;
+ ev->x = edev->mouse.ix;
+ ev->y = edev->mouse.iy;
ev->root.x = ev->x;
ev->root.y = ev->y;
if (!(edev = libinput_device_get_user_data(device))) return;
- edev->mouse.x += libinput_event_pointer_get_dx(event);
- edev->mouse.y += libinput_event_pointer_get_dy(event);
+ edev->mouse.dx += libinput_event_pointer_get_dx(event);
+ edev->mouse.dy += libinput_event_pointer_get_dy(event);
- _device_pointer_motion(edev, event);
+ if (floor(edev->mouse.dx) == edev->mouse.ix &&
+ floor(edev->mouse.dy) == edev->mouse.iy) return;
+
+ edev->mouse.ix = edev->mouse.dx;
+ edev->mouse.iy = edev->mouse.dy;
+ _device_pointer_motion(edev, event);
}
static void
if (!(edev = libinput_device_get_user_data(device))) return;
- edev->mouse.x =
- libinput_event_pointer_get_absolute_x_transformed(event,
+ edev->mouse.dx =
+ libinput_event_pointer_get_absolute_x_transformed(event,
edev->output->current_mode->width);
- edev->mouse.y =
- libinput_event_pointer_get_absolute_y_transformed(event,
+ edev->mouse.dy =
+ libinput_event_pointer_get_absolute_y_transformed(event,
edev->output->current_mode->height);
+ if (floor(edev->mouse.dx) == edev->mouse.ix &&
+ floor(edev->mouse.dy) == edev->mouse.iy) return;
+
_device_pointer_motion(edev, event);
}
_device_modifiers_update(edev);
ev->modifiers = edev->xkb.modifiers;
- ev->x = edev->mouse.x;
- ev->y = edev->mouse.y;
+ ev->x = edev->mouse.ix;
+ ev->y = edev->mouse.iy;
ev->root.x = ev->x;
ev->root.y = ev->y;
_device_modifiers_update(edev);
ev->modifiers = edev->xkb.modifiers;
- ev->x = edev->mouse.x;
- ev->y = edev->mouse.y;
+ ev->x = edev->mouse.ix;
+ ev->y = edev->mouse.iy;
ev->root.x = ev->x;
ev->root.y = ev->y;
_device_modifiers_update(edev);
ev->modifiers = edev->xkb.modifiers;
- ev->x = edev->mouse.x;
- ev->y = edev->mouse.y;
+ ev->x = edev->mouse.ix;
+ ev->y = edev->mouse.iy;
ev->root.x = ev->x;
ev->root.y = ev->y;
if (!(edev = libinput_device_get_user_data(device))) return;
- edev->mouse.x =
+ edev->mouse.ix = edev->mouse.dx =
libinput_event_touch_get_x_transformed(event, edev->output->current_mode->width);
- edev->mouse.y =
+ edev->mouse.iy = edev->mouse.dy =
libinput_event_touch_get_y_transformed(event, edev->output->current_mode->height);
edev->mt_slot = libinput_event_touch_get_seat_slot(event);
if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Move)))) return;
- edev->mouse.x =
+ edev->mouse.dx =
libinput_event_touch_get_x_transformed(event, edev->output->current_mode->width);
- edev->mouse.y =
+ edev->mouse.dy =
libinput_event_touch_get_y_transformed(event, edev->output->current_mode->height);
+ if (floor(edev->mouse.dx) == edev->mouse.ix &&
+ floor(edev->mouse.dy) == edev->mouse.iy) return;
+
+ edev->mouse.ix = edev->mouse.dx;
+ edev->mouse.iy = edev->mouse.dy;
+
edev->mt_slot = libinput_event_touch_get_seat_slot(event);
ev->window = (Ecore_Window)input->dev->window;
ev->modifiers = edev->xkb.modifiers;
ev->modifiers = 0;
- ev->x = edev->mouse.x;
- ev->y = edev->mouse.y;
+ ev->x = edev->mouse.ix;
+ ev->y = edev->mouse.iy;
ev->root.x = ev->x;
ev->root.y = ev->y;