mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-09 00:21:56 -07:00
@@ -688,6 +688,9 @@ void CInputManager::onMouseWheel(wlr_pointer_axis_event* e) {
|
|||||||
|
|
||||||
auto factor = (*PSCROLLFACTOR <= 0.f || e->source != WLR_AXIS_SOURCE_FINGER ? 1.f : *PSCROLLFACTOR);
|
auto factor = (*PSCROLLFACTOR <= 0.f || e->source != WLR_AXIS_SOURCE_FINGER ? 1.f : *PSCROLLFACTOR);
|
||||||
|
|
||||||
|
const auto EMAP = std::unordered_map<std::string, std::any>{{"event", e}};
|
||||||
|
EMIT_HOOK_EVENT_CANCELLABLE("mouseAxis", EMAP);
|
||||||
|
|
||||||
bool passEvent = g_pKeybindManager->onAxisEvent(e);
|
bool passEvent = g_pKeybindManager->onAxisEvent(e);
|
||||||
|
|
||||||
g_pCompositor->notifyIdleActivity();
|
g_pCompositor->notifyIdleActivity();
|
||||||
@@ -1152,6 +1155,9 @@ void CInputManager::onKeyboardKey(wlr_keyboard_key_event* e, SKeyboard* pKeyboar
|
|||||||
if (!pKeyboard->enabled)
|
if (!pKeyboard->enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
const auto EMAP = std::unordered_map<std::string, std::any>{{"keyboard", pKeyboard}, {"event", e}};
|
||||||
|
EMIT_HOOK_EVENT_CANCELLABLE("keyPress", EMAP);
|
||||||
|
|
||||||
static auto* const PDPMS = &g_pConfigManager->getConfigValuePtr("misc:key_press_enables_dpms")->intValue;
|
static auto* const PDPMS = &g_pConfigManager->getConfigValuePtr("misc:key_press_enables_dpms")->intValue;
|
||||||
if (*PDPMS && !g_pCompositor->m_bDPMSStateON) {
|
if (*PDPMS && !g_pCompositor->m_bDPMSStateON) {
|
||||||
// enable dpms
|
// enable dpms
|
||||||
|
Reference in New Issue
Block a user