mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-08 21:45:58 +01:00
config: add key_press_enables_dpms
This commit is contained in:
parent
71ef1bde7e
commit
146d231ec5
2 changed files with 7 additions and 0 deletions
|
@ -71,6 +71,7 @@ void CConfigManager::setDefaultVars() {
|
||||||
configValues["misc:vfr"].intValue = 1;
|
configValues["misc:vfr"].intValue = 1;
|
||||||
configValues["misc:vrr"].intValue = 0;
|
configValues["misc:vrr"].intValue = 0;
|
||||||
configValues["misc:mouse_move_enables_dpms"].intValue = 0;
|
configValues["misc:mouse_move_enables_dpms"].intValue = 0;
|
||||||
|
configValues["misc:key_press_enables_dpms"].intValue = 0;
|
||||||
configValues["misc:always_follow_on_dnd"].intValue = 1;
|
configValues["misc:always_follow_on_dnd"].intValue = 1;
|
||||||
configValues["misc:layers_hog_keyboard_focus"].intValue = 1;
|
configValues["misc:layers_hog_keyboard_focus"].intValue = 1;
|
||||||
configValues["misc:animate_manual_resizes"].intValue = 1;
|
configValues["misc:animate_manual_resizes"].intValue = 1;
|
||||||
|
|
|
@ -963,6 +963,12 @@ void CInputManager::onKeyboardKey(wlr_keyboard_key_event* e, SKeyboard* pKeyboar
|
||||||
if (!pKeyboard->enabled)
|
if (!pKeyboard->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
static auto* const PDPMS = &g_pConfigManager->getConfigValuePtr("key_press_enables_dpms")->intValue;
|
||||||
|
if (*PDPMS && g_pCompositor->m_bDPMSStateON) {
|
||||||
|
// enable dpms
|
||||||
|
g_pKeybindManager->dpms("on");
|
||||||
|
}
|
||||||
|
|
||||||
bool passEvent = g_pKeybindManager->onKeyEvent(e, pKeyboard);
|
bool passEvent = g_pKeybindManager->onKeyEvent(e, pKeyboard);
|
||||||
|
|
||||||
wlr_idle_notify_activity(g_pCompositor->m_sWLRIdle, g_pCompositor->m_sSeat.seat);
|
wlr_idle_notify_activity(g_pCompositor->m_sWLRIdle, g_pCompositor->m_sSeat.seat);
|
||||||
|
|
Loading…
Reference in a new issue