From now on mouse wheel events will work both with qt-compositor and
Weston.
Change-Id: I54876cd45f3530ea9b4b7962ca52c0974e1cb2d5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
uint32_t time = m_compositor->currentTimeMsecs();
uint32_t axis = orientation == Qt::Horizontal ? WL_POINTER_AXIS_HORIZONTAL_SCROLL
: WL_POINTER_AXIS_VERTICAL_SCROLL;
- wl_pointer_send_axis(resource, time, axis, delta);
+ wl_pointer_send_axis(resource, time, axis, delta / 120);
}
void InputDevice::sendKeyPressEvent(uint code)
QWaylandWindow *window = inputDevice->mPointerFocus;
Qt::Orientation orientation = axis == WL_POINTER_AXIS_HORIZONTAL_SCROLL ? Qt::Horizontal
: Qt::Vertical;
- QWindowSystemInterface::handleWheelEvent(window->window(), time,
+ QWindowSystemInterface::handleWheelEvent(window->window(),
+ time,
inputDevice->mSurfacePos,
inputDevice->mGlobalPos,
- value, orientation);
+ value * 120,
+ orientation);
}
#ifndef QT_NO_WAYLAND_XKB