summaryrefslogtreecommitdiffstats
path: root/tdecore
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-02-26 03:20:10 +0100
committerSlávek Banko <slavek.banko@axis.cz>2020-02-26 03:20:10 +0100
commit8bfa123fb66d2765b7cce78415831a499b4e9e9d (patch)
tree96159df5ee190ed108c944211cf9cf7d79a83ca3 /tdecore
parentf68fadda81d0e107d904a08db30bd8cccbbd1a21 (diff)
downloadtdelibs-8bfa123fb66d2765b7cce78415831a499b4e9e9d.tar.gz
tdelibs-8bfa123fb66d2765b7cce78415831a499b4e9e9d.zip
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>
Diffstat (limited to 'tdecore')
-rw-r--r--tdecore/tdehw/tdeeventdevice.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tdecore/tdehw/tdeeventdevice.cpp b/tdecore/tdehw/tdeeventdevice.cpp
index debed25e4..ac92599ae 100644
--- a/tdecore/tdehw/tdeeventdevice.cpp
+++ b/tdecore/tdehw/tdeeventdevice.cpp
@@ -367,6 +367,7 @@ void TDEEventDevice::eventReceived() {
emit keyPressed(ev.code, this);
}
if (ev.type == EV_SW) {
+ internalReadActiveSwitches();
emit switchChanged();
}
}