tdehwlib: Add a read of the current switch state before invoking

a switchChanged() signal for an EV_SW input event.

This resolves the detection of closing the lid on some hardware.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 8bfa123fb6)
r14.0.x
Slávek Banko 4 years ago
parent 1945986691
commit 2f2ed5c1ae
Signed by: SlavekB
GPG Key ID: 608F5293A04BE668

@ -367,6 +367,7 @@ void TDEEventDevice::eventReceived() {
emit keyPressed(ev.code, this);
}
if (ev.type == EV_SW) {
internalReadActiveSwitches();
emit switchChanged();
}
}

Loading…
Cancel
Save