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>
pull/76/head
Slávek Banko 5 years ago
parent f68fadda81
commit 8bfa123fb6
No known key found for this signature in database
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