Commit a9abb0cb authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Properly store the powerdown action

Summary: The event needs to propagate correctly.

Test Plan: Played with it on my laptop

Reviewers: #plasma:_mobile, bshah, broulik

Reviewed By: #plasma:_mobile, bshah, broulik

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D28491
parent 41ef07d6
......@@ -138,6 +138,9 @@ void HandleButtonEvents::onButtonPressed(BackendInterface::ButtonType type)
case BackendInterface::PowerButton:
processAction(m_powerButtonAction);
break;
case BackendInterface::PowerDownButton:
processAction(m_powerDownButtonAction);
break;
case BackendInterface::SleepButton:
processAction(m_sleepButtonAction);
break;
......@@ -194,6 +197,7 @@ bool HandleButtonEvents::loadAction(const KConfigGroup& config)
m_lidAction = config.readEntry<uint>("lidAction", 0);
m_triggerLidActionWhenExternalMonitorPresent = config.readEntry<bool>("triggerLidActionWhenExternalMonitorPresent", false);
m_powerButtonAction = config.readEntry<uint>("powerButtonAction", 0);
m_powerDownButtonAction = config.readEntry<uint>("powerDownAction", 0);
checkOutputs();
......
......@@ -76,6 +76,7 @@ private:
bool m_externalMonitorPresent = false;
uint m_powerButtonAction = 0;
uint m_powerDownButtonAction = 0;
uint m_sleepButtonAction = 1;
uint m_hibernateButtonAction = 2;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment