From c8e71c462c0aa4f449239771b10f56a4894e8f62 Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Sun, 20 Dec 2015 22:52:41 +0100 Subject: [PATCH] [Containment Actions] Send along proper wheel orientation BUG: 356799 FIXED-IN: 5.5.2 REVIEW: 126432 --- shell/currentcontainmentactionsmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/currentcontainmentactionsmodel.cpp b/shell/currentcontainmentactionsmodel.cpp index fe1c676e9..d442985f9 100644 --- a/shell/currentcontainmentactionsmodel.cpp +++ b/shell/currentcontainmentactionsmodel.cpp @@ -89,7 +89,7 @@ QString CurrentContainmentActionsModel::mouseEventString(int mouseButton, int mo QString CurrentContainmentActionsModel::wheelEventString(const QPointF &delta, int mouseButtons, int modifiers) { - QWheelEvent *wheel = new QWheelEvent(QPointF(), QPointF(), delta.toPoint(), QPoint(), 0, Qt::Vertical, (Qt::MouseButtons)mouseButtons, (Qt::KeyboardModifiers) modifiers); + QWheelEvent *wheel = new QWheelEvent(QPointF(), QPointF(), delta.toPoint(), QPoint(), 0, qAbs(delta.x()) > qAbs(delta.y()) ? Qt::Horizontal : Qt::Vertical, (Qt::MouseButtons)mouseButtons, (Qt::KeyboardModifiers) modifiers); QString string = Plasma::ContainmentActions::eventToString(wheel);