From 797a02e472256dc50ab39649ad26f178143b89b2 Mon Sep 17 00:00:00 2001 From: Zakk Date: Tue, 7 May 2024 12:51:13 -0400 Subject: [PATCH] Chase hyprland --- easymotionDeco.hpp | 1 + main.cpp | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/easymotionDeco.hpp b/easymotionDeco.hpp index f8fbdd4..24a127d 100644 --- a/easymotionDeco.hpp +++ b/easymotionDeco.hpp @@ -5,6 +5,7 @@ #include #include +#include #include "globals.hpp" class CHyprEasyLabel : public IHyprWindowDecoration { diff --git a/main.cpp b/main.cpp index 4bb1b5d..7b7a2c2 100644 --- a/main.cpp +++ b/main.cpp @@ -187,14 +187,16 @@ bool oneasymotionKeypress(void *self, std::any data) { auto map = std::any_cast>(data); std::any kany = map["keyboard"]; - wlr_keyboard_key_event *ev = std::any_cast(map["event"]); - SKeyboard *keyboard = std::any_cast(kany); + IKeyboard::SKeyEvent ev = std::any_cast(map["event"]); + SPkeyboard = std::any_cast>(kany); - const auto KEYCODE = ev->keycode + 8; + + + const auto KEYCODE = ev.keycode + 8; const xkb_keysym_t KEYSYM = xkb_state_key_get_one_sym(keyboard->xkbTranslationState, KEYCODE); - if (ev->state != WL_KEYBOARD_KEY_STATE_PRESSED) return false; + if (ev.state != WL_KEYBOARD_KEY_STATE_PRESSED) return false; xkb_keysym_t actionKeysym = 0; for (auto &ml : g_pGlobalState->motionLabels) {