input: use WheelEvent instead of QWheelEvent

This commit is contained in:
Xaver Hugl 2022-12-21 15:53:11 +01:00
parent 3d92f5b75f
commit 55e55b9b15
6 changed files with 17 additions and 16 deletions

View file

@ -34,7 +34,7 @@ bool DpmsInputEventFilter::pointerEvent(MouseEvent *event, quint32 nativeButton)
return true;
}
bool DpmsInputEventFilter::wheelEvent(QWheelEvent *event)
bool DpmsInputEventFilter::wheelEvent(WheelEvent *event)
{
notify();
return true;

View file

@ -25,7 +25,7 @@ public:
~DpmsInputEventFilter() override;
bool pointerEvent(MouseEvent *event, quint32 nativeButton) override;
bool wheelEvent(QWheelEvent *event) override;
bool wheelEvent(WheelEvent *event) override;
bool keyEvent(QKeyEvent *event) override;
bool touchDown(qint32 id, const QPointF &pos, quint32 time) override;
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override;

View file

@ -110,7 +110,7 @@ bool InputEventFilter::pointerEvent(MouseEvent *event, quint32 nativeButton)
return false;
}
bool InputEventFilter::wheelEvent(QWheelEvent *event)
bool InputEventFilter::wheelEvent(WheelEvent *event)
{
return false;
}
@ -336,7 +336,7 @@ public:
}
return true;
}
bool wheelEvent(QWheelEvent *event) override
bool wheelEvent(WheelEvent *event) override
{
if (!waylandServer()->isScreenLocked()) {
return false;
@ -515,7 +515,7 @@ public:
}
return static_cast<EffectsHandlerImpl *>(effects)->checkInputWindowEvent(event);
}
bool wheelEvent(QWheelEvent *event) override
bool wheelEvent(WheelEvent *event) override
{
if (!effects) {
return false;
@ -613,7 +613,7 @@ public:
}
return true;
}
bool wheelEvent(QWheelEvent *event) override
bool wheelEvent(WheelEvent *event) override
{
// filter out while moving a window
return workspace()->moveResizeWindow() != nullptr;
@ -723,7 +723,7 @@ public:
}
return true;
}
bool wheelEvent(QWheelEvent *event) override
bool wheelEvent(WheelEvent *event) override
{
// filter out while selecting a window
return m_active;
@ -883,7 +883,7 @@ public:
}
return false;
}
bool wheelEvent(QWheelEvent *event) override
bool wheelEvent(WheelEvent *event) override
{
if (event->modifiers() == Qt::NoModifier) {
return false;
@ -1189,7 +1189,7 @@ class InternalWindowEventFilter : public InputEventFilter
QCoreApplication::sendEvent(internal, &mouseEvent);
return mouseEvent.isAccepted();
}
bool wheelEvent(QWheelEvent *event) override
bool wheelEvent(WheelEvent *event) override
{
if (!input()->pointer()->focus() || !input()->pointer()->focus()->isInternal()) {
return false;
@ -1383,7 +1383,7 @@ public:
}
return false;
}
bool wheelEvent(QWheelEvent *event) override
bool wheelEvent(WheelEvent *event) override
{
auto decoration = input()->pointer()->decoration();
if (!decoration) {
@ -1584,7 +1584,7 @@ public:
}
return true;
}
bool wheelEvent(QWheelEvent *event) override
bool wheelEvent(WheelEvent *event) override
{
if (!workspace()->tabbox() || !workspace()->tabbox()->isGrabbed()) {
return false;
@ -1668,7 +1668,7 @@ public:
}
return false;
}
bool wheelEvent(QWheelEvent *event) override
bool wheelEvent(WheelEvent *event) override
{
if (event->angleDelta().y() == 0) {
// only actions on vertical scroll
@ -1761,7 +1761,7 @@ public:
}
return true;
}
bool wheelEvent(QWheelEvent *event) override
bool wheelEvent(WheelEvent *event) override
{
auto seat = waylandServer()->seat();
seat->setTimestamp(event->timestamp());

View file

@ -46,6 +46,7 @@ class TabletEvent;
class TabletToolId;
class TabletPadId;
class MouseEvent;
class WheelEvent;
namespace Decoration
{
@ -391,7 +392,7 @@ public:
* @param event The event information about the axis event
* @return @c true to stop further event processing, @c false to pass to next filter
*/
virtual bool wheelEvent(QWheelEvent *event);
virtual bool wheelEvent(WheelEvent *event);
/**
* Event filter for keyboard events.
*

View file

@ -17,7 +17,7 @@ bool PlaceholderInputEventFilter::pointerEvent(MouseEvent *event, quint32 native
return true;
}
bool PlaceholderInputEventFilter::wheelEvent(QWheelEvent *event)
bool PlaceholderInputEventFilter::wheelEvent(WheelEvent *event)
{
return true;
}

View file

@ -17,7 +17,7 @@ class PlaceholderInputEventFilter : public InputEventFilter
{
public:
bool pointerEvent(MouseEvent *event, quint32 nativeButton) override;
bool wheelEvent(QWheelEvent *event) override;
bool wheelEvent(WheelEvent *event) override;
bool keyEvent(QKeyEvent *event) override;
bool touchDown(qint32 id, const QPointF &pos, quint32 time) override;
bool touchMotion(qint32 id, const QPointF &pos, quint32 time) override;