From 8bfa123fb66d2765b7cce78415831a499b4e9e9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Wed, 26 Feb 2020 03:20:10 +0100 Subject: tdehwlib: Add a read of the current switch state before invoking a switchChanged() signal for an EV_SW input event. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This resolves the detection of closing the lid on some hardware. Signed-off-by: Slávek Banko --- tdecore/tdehw/tdeeventdevice.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'tdecore/tdehw') 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(); } } -- cgit v1.2.1