diff options
author | Slávek Banko <[email protected]> | 2020-02-26 03:20:10 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2020-02-26 03:20:10 +0100 |
commit | 8bfa123fb66d2765b7cce78415831a499b4e9e9d (patch) | |
tree | 96159df5ee190ed108c944211cf9cf7d79a83ca3 | |
parent | f68fadda81d0e107d904a08db30bd8cccbbd1a21 (diff) | |
download | tdelibs-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 <[email protected]>
-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 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(); } } |