summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehw/tdehardwaredevices.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-08-24 19:48:44 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-08-24 19:48:44 -0500
commitedb0581f3426731bb8247d61f3676d6ce00506f1 (patch)
tree1ecd2014355bcbba2085a42a5e81054042da377c /tdecore/tdehw/tdehardwaredevices.cpp
parent8e37bb9724a476c7f34bd80545a21a91dd63b5b2 (diff)
downloadtdelibs-edb0581f3426731bb8247d61f3676d6ce00506f1.tar.gz
tdelibs-edb0581f3426731bb8247d61f3676d6ce00506f1.zip
Fix human readable display of ACPI buttons
Diffstat (limited to 'tdecore/tdehw/tdehardwaredevices.cpp')
-rw-r--r--tdecore/tdehw/tdehardwaredevices.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tdecore/tdehw/tdehardwaredevices.cpp b/tdecore/tdehw/tdehardwaredevices.cpp
index 250cd11b6..2922ec4d8 100644
--- a/tdecore/tdehw/tdehardwaredevices.cpp
+++ b/tdecore/tdehw/tdehardwaredevices.cpp
@@ -3135,6 +3135,16 @@ void TDEHardwareDevices::updateExistingDeviceInformation(TDEGenericDevice* exist
supportedSwitches = supportedSwitches | TDESwitchType::LineInInsert;
}
#endif
+ // Keep in sync with ACPI Event/Input identification routines above
+ if (edevice->systemPath().contains("PNP0C0D")) {
+ supportedSwitches = supportedSwitches | TDESwitchType::Lid;
+ }
+ if (edevice->systemPath().contains("PNP0C0E") || edevice->systemPath().contains("/LNXSLPBN")) {
+ supportedSwitches = supportedSwitches | TDESwitchType::SleepButton;
+ }
+ if (edevice->systemPath().contains("PNP0C0C") || edevice->systemPath().contains("/LNXPWRBN")) {
+ supportedSwitches = supportedSwitches | TDESwitchType::PowerButton;
+ }
}
edevice->internalSetProvidedSwitches(supportedSwitches);