summaryrefslogtreecommitdiffstats
path: root/src/hardware.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-08-25 19:35:56 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-08-25 19:35:56 -0500
commitacd6cbd7deb552fb4329225a86f09db818c78639 (patch)
tree7f0d373df81602d3bb1d3563cc4b8b10e7e21bc9 /src/hardware.cpp
parentf956245ca27cd01a855f8951237ba4c63456c974 (diff)
downloadtdepowersave-acd6cbd7deb552fb4329225a86f09db818c78639.tar.gz
tdepowersave-acd6cbd7deb552fb4329225a86f09db818c78639.zip
Fix ACPI event detection as a normal user
This resolves Bug 1597 Do not display logout dialog if screensaver/lock dialog is active
Diffstat (limited to 'src/hardware.cpp')
-rw-r--r--src/hardware.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/hardware.cpp b/src/hardware.cpp
index c0aded6..cf1cdd9 100644
--- a/src/hardware.cpp
+++ b/src/hardware.cpp
@@ -39,6 +39,8 @@
#include "tdepowersave_debug.h"
#include "privileges.h"
+// #define USE_EVENT_DEVICES_DIRECTLY 1
+
/*! The default constructor of the class HardwareInfo */
HardwareInfo::HardwareInfo() {
kdDebugFuncIn(trace);
@@ -55,7 +57,10 @@ HardwareInfo::HardwareInfo() {
// initialize connection to the TDE hardware library
m_hwdevices = TDEGlobal::hardwareDevices();
connect(m_hwdevices, TQT_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQT_SLOT(processHardwareChangedEvent(TDEGenericDevice*)));
+
+#ifdef USE_EVENT_DEVICES_DIRECTLY
connect(m_hwdevices, TQT_SIGNAL(eventDeviceKeyPressed(unsigned int, TDEEventDevice*)), this, TQT_SLOT(processKeyPressEvent(unsigned int, TDEEventDevice*)));
+#endif
// update everything the first time
update_info_ac_changed = true;