Fix the tablet mode manager

Summary:
Previously we connected the hasTabletModeSwitchChanged to the
tabletModeAvailableChanged which meant that in startup once libinput
signaled us that we have switch, we would toggle that we now have a
tablet mode.

But, we were connecting this to wrong signal, as a result tablet mode
would become available, but actual tablet switch inputspy was never
getting registered, so tablet mode events were silently ignored.

Test Plan:
tested on Dell Inspiron 7000 laptop where tablet mode switch
is available

Reviewers: zzag

Reviewed By: zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27975
master
Bhushan Shah 2020-03-11 12:43:10 +05:30
parent ffcdd751ea
commit 7c5c7b5a1e
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@ TabletModeManager::TabletModeManager(QObject *parent)
QDBusConnection::ExportAllProperties | QDBusConnection::ExportAllSignals
);
connect(input(), &InputRedirection::hasTabletModeSwitchChanged, this, &TabletModeManager::tabletModeAvailableChanged);
connect(input(), &InputRedirection::hasTabletModeSwitchChanged, this, &TabletModeManager::hasTabletModeInputChanged);
}
void KWin::TabletModeManager::hasTabletModeInputChanged(bool set)