@ -3501,13 +3501,19 @@ void TDEHardwareDevices::updateExistingDeviceInformation(TDEGenericDevice* exist
if ( device - > type ( ) = = TDEGenericDeviceType : : Event ) {
if ( device - > type ( ) = = TDEGenericDeviceType : : Event ) {
// Try to obtain as much type information about this event device as possible
// Try to obtain as much type information about this event device as possible
TDEEventDevice * edevice = dynamic_cast < TDEEventDevice * > ( device ) ;
TDEEventDevice * edevice = dynamic_cast < TDEEventDevice * > ( device ) ;
if ( edevice - > systemPath ( ) . contains ( " PNP0C0D " ) ) {
TDESwitchType : : TDESwitchType edevice_switches = edevice - > providedSwitches ( ) ;
if ( edevice - > systemPath ( ) . contains ( " PNP0C0D " )
| | ( edevice_switches & TDESwitchType : : Lid ) ) {
edevice - > internalSetEventType ( TDEEventDeviceType : : ACPILidSwitch ) ;
edevice - > internalSetEventType ( TDEEventDeviceType : : ACPILidSwitch ) ;
}
}
else if ( edevice - > systemPath ( ) . contains ( " PNP0C0E " ) | | edevice - > systemPath ( ) . contains ( " /LNXSLPBN " ) ) {
else if ( edevice - > systemPath ( ) . contains ( " PNP0C0E " )
| | edevice - > systemPath ( ) . contains ( " /LNXSLPBN " )
| | ( edevice_switches & TDESwitchType : : SleepButton ) ) {
edevice - > internalSetEventType ( TDEEventDeviceType : : ACPISleepButton ) ;
edevice - > internalSetEventType ( TDEEventDeviceType : : ACPISleepButton ) ;
}
}
else if ( edevice - > systemPath ( ) . contains ( " PNP0C0C " ) | | edevice - > systemPath ( ) . contains ( " /LNXPWRBN " ) ) {
else if ( edevice - > systemPath ( ) . contains ( " PNP0C0C " )
| | edevice - > systemPath ( ) . contains ( " /LNXPWRBN " )
| | ( edevice_switches & TDESwitchType : : PowerButton ) ) {
edevice - > internalSetEventType ( TDEEventDeviceType : : ACPIPowerButton ) ;
edevice - > internalSetEventType ( TDEEventDeviceType : : ACPIPowerButton ) ;
}
}
else if ( edevice - > systemPath ( ) . contains ( " _acpi " ) ) {
else if ( edevice - > systemPath ( ) . contains ( " _acpi " ) ) {