[libinput] Remove workaround for mouse configuration
Summary: With the Wayland enabled Mouse KCM we do not need the workaround to control button mapping and acceleration anymore. Depends on D11468 Test Plan: Compiles. Reviewers: #kwin, graesslin Reviewed By: #kwin, graesslin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D11472
This commit is contained in:
parent
e61383a198
commit
b35939c958
1 changed files with 0 additions and 19 deletions
|
@ -28,8 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "../udev.h"
|
||||
#include "libinput_logging.h"
|
||||
|
||||
#include <KConfigGroup>
|
||||
|
||||
#include <QDBusMessage>
|
||||
#include <QDBusConnection>
|
||||
#include <QDBusPendingCall>
|
||||
|
@ -603,23 +601,6 @@ void Connection::applyDeviceConfig(Device *device)
|
|||
// pass configuration to Device
|
||||
device->setConfig(m_config->group("Libinput").group(QString::number(device->vendor())).group(QString::number(device->product())).group(device->name()));
|
||||
device->loadConfiguration();
|
||||
|
||||
if (device->isPointer() && !device->isTouchpad()) {
|
||||
const KConfigGroup group = m_config->group("Mouse");
|
||||
device->setLeftHanded(group.readEntry("MouseButtonMapping", "RightHanded") == QLatin1String("LeftHanded"));
|
||||
qreal accel = group.readEntry("Acceleration", -1.0);
|
||||
if (qFuzzyCompare(accel, -1.0) || qFuzzyCompare(accel, 1.0)) {
|
||||
// default value
|
||||
device->setPointerAcceleration(0.0);
|
||||
} else {
|
||||
// the X11-based config is mapped in [0.1,20.0] with 1.0 being the "normal" setting - we assume that's the default
|
||||
if (accel < 1.0) {
|
||||
device->setPointerAcceleration(-1.0 + ((accel * 10.0) - 1.0) / 9.0);
|
||||
} else {
|
||||
device->setPointerAcceleration((accel -1.0)/19.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Connection::slotKGlobalSettingsNotifyChange(int type, int arg)
|
||||
|
|
Loading…
Reference in a new issue