Changeset View
Changeset View
Standalone View
Standalone View
src/server/seat_interface.cpp
Show First 20 Lines • Show All 840 Lines • ▼ Show 20 Line(s) | 840 | { | |||
---|---|---|---|---|---|
841 | Q_D(); | 841 | Q_D(); | ||
842 | auto it = d->globalPointer.buttonStates.constFind(button); | 842 | auto it = d->globalPointer.buttonStates.constFind(button); | ||
843 | if (it == d->globalPointer.buttonStates.constEnd()) { | 843 | if (it == d->globalPointer.buttonStates.constEnd()) { | ||
844 | return false; | 844 | return false; | ||
845 | } | 845 | } | ||
846 | return it.value() == Private::Pointer::State::Pressed ? true : false; | 846 | return it.value() == Private::Pointer::State::Pressed ? true : false; | ||
847 | } | 847 | } | ||
848 | 848 | | |||
849 | void SeatInterface::pointerAxisV5(Qt::Orientation orientation, qreal delta, qint32 discreteDelta, PointerAxisSource source) | ||||
850 | { | ||||
851 | Q_D(); | ||||
852 | if (d->drag.mode == Private::Drag::Mode::Pointer) { | ||||
853 | // ignore | ||||
854 | return; | ||||
855 | } | ||||
856 | if (d->globalPointer.focus.surface) { | ||||
857 | for (auto it = d->globalPointer.focus.pointers.constBegin(), end = d->globalPointer.focus.pointers.constEnd(); it != end; ++it) { | ||||
858 | (*it)->axis(orientation, delta, discreteDelta, source); | ||||
859 | } | ||||
860 | } | ||||
861 | } | ||||
862 | | ||||
849 | void SeatInterface::pointerAxis(Qt::Orientation orientation, quint32 delta) | 863 | void SeatInterface::pointerAxis(Qt::Orientation orientation, quint32 delta) | ||
850 | { | 864 | { | ||
851 | Q_D(); | 865 | Q_D(); | ||
852 | if (d->drag.mode == Private::Drag::Mode::Pointer) { | 866 | if (d->drag.mode == Private::Drag::Mode::Pointer) { | ||
853 | // ignore | 867 | // ignore | ||
854 | return; | 868 | return; | ||
855 | } | 869 | } | ||
856 | if (d->globalPointer.focus.surface) { | 870 | if (d->globalPointer.focus.surface) { | ||
▲ Show 20 Lines • Show All 745 Lines • Show Last 20 Lines |