Skip to content

Instantly share code, notes, and snippets.

@Zarokka
Last active March 8, 2017 10:07
Show Gist options
  • Save Zarokka/10ac4cecd5ebc5ce815136a2853850d4 to your computer and use it in GitHub Desktop.
Save Zarokka/10ac4cecd5ebc5ce815136a2853850d4 to your computer and use it in GitHub Desktop.
fix Bug 372555 - Input Device - Mouse - Reverse scroll direction Not Working
diff --git a/libinput/connection.cpp b/libinput/connection.cpp
index 4c73883f3..42f96cc49 100644
--- a/libinput/connection.cpp
+++ b/libinput/connection.cpp
@@ -527,6 +527,7 @@ void Connection::applyDeviceConfig(Device *device)
if (device->isPointer() && !device->isTouchpad()) {
const KConfigGroup group = m_config->group("Mouse");
device->setLeftHanded(group.readEntry("MouseButtonMapping", "RightHanded") == QLatin1String("LeftHanded"));
+ device->setNaturalScroll(group.readEntry("ReverseScrollPolarity", false));
qreal accel = group.readEntry("Acceleration", -1.0);
if (qFuzzyCompare(accel, -1.0) || qFuzzyCompare(accel, 1.0)) {
// default value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment