Commit da0ba763 authored by Martin Flöser's avatar Martin Flöser

Invert the scroll direction for wheel events on internal windows

Summary:
For whatever reason Qt scrolled the wrong way on internal windows. As a
new QWheelEvent is constructed anyway, just multiply by -1 to get the
direction fixed.

BUG: 371999
FIXED-IN: 5.8.4

Test Plan: Tried debug console in nested setup, scrolled correctly now.

Reviewers: #kwin, #plasma_on_wayland, broulik

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3247
parent db58c421
......@@ -492,8 +492,8 @@ class InternalWindowEventFilter : public InputEventFilter {
const Qt::Orientation orientation = (event->angleDelta().x() != 0) ? Qt::Horizontal : Qt::Vertical;
const int delta = event->angleDelta().x() != 0 ? event->angleDelta().x() : event->angleDelta().y();
QWheelEvent e(localPos, event->globalPosF(), QPoint(),
event->angleDelta(),
delta,
event->angleDelta() * -1,
delta * -1,
orientation,
event->buttons(),
event->modifiers());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment