diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2020-02-26 03:20:10 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2020-02-26 03:20:58 +0100 |
commit | 2f2ed5c1ae4b9d048fa82b5558c9521c4f85d94f (patch) | |
tree | dd2c643055190ba7407d2cb9fbc22e826a038002 /tdecore | |
parent | 1945986691db4c8d8742ebed3f8b29f4e2f83eaa (diff) | |
download | tdelibs-2f2ed5c1ae4b9d048fa82b5558c9521c4f85d94f.tar.gz tdelibs-2f2ed5c1ae4b9d048fa82b5558c9521c4f85d94f.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>
(cherry picked from commit 8bfa123fb66d2765b7cce78415831a499b4e9e9d)
Diffstat (limited to 'tdecore')
-rw-r--r-- | tdecore/tdehw/tdeeventdevice.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tdecore/tdehw/tdeeventdevice.cpp b/tdecore/tdehw/tdeeventdevice.cpp index d8627d9b1..88509b3ac 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(); } } |