diff options
| author | Mykola Perehudov <nexec@users.noreply.github.com> | 2023-07-06 16:23:11 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-06 15:23:11 +0200 |
| commit | bbedb065e1fbb39bc6bdbd66b61c48fcff4a17a4 (patch) | |
| tree | e8bce3413001beade21508476d72d6608a029f33 /src | |
| parent | bc34713b29fccff94deff116a287f532b70f9c55 (diff) | |
eventmanager: drop obsoleted ignore events flag (#2660)
This flag became obsoleted in commit
287e6c4ede30c8e5e85863cd85f157e17e24879c
Diffstat (limited to 'src')
| -rw-r--r-- | src/helpers/Workspace.cpp | 4 | ||||
| -rw-r--r-- | src/managers/EventManager.cpp | 4 | ||||
| -rw-r--r-- | src/managers/EventManager.hpp | 7 | ||||
| -rw-r--r-- | src/managers/input/InputManager.cpp | 8 |
4 files changed, 10 insertions, 13 deletions
diff --git a/src/helpers/Workspace.cpp b/src/helpers/Workspace.cpp index 6498a1e7..a71dd55d 100644 --- a/src/helpers/Workspace.cpp +++ b/src/helpers/Workspace.cpp @@ -36,7 +36,7 @@ CWorkspace::CWorkspace(int monitorID, std::string name, bool special) { m_vRenderOffset.registerVar(); m_fAlpha.registerVar(); - g_pEventManager->postEvent({"createworkspace", m_szName}, true); + g_pEventManager->postEvent({"createworkspace", m_szName}); EMIT_HOOK_EVENT("createWorkspace", this); } @@ -51,7 +51,7 @@ CWorkspace::~CWorkspace() { m_pWlrHandle = nullptr; } - g_pEventManager->postEvent({"destroyworkspace", m_szName}, true); + g_pEventManager->postEvent({"destroyworkspace", m_szName}); EMIT_HOOK_EVENT("destroyWorkspace", this); } diff --git a/src/managers/EventManager.cpp b/src/managers/EventManager.cpp index 51532454..054c8d38 100644 --- a/src/managers/EventManager.cpp +++ b/src/managers/EventManager.cpp @@ -121,9 +121,9 @@ void CEventManager::flushEvents() { eventQueueMutex.unlock(); } -void CEventManager::postEvent(const SHyprIPCEvent event, bool force) { +void CEventManager::postEvent(const SHyprIPCEvent event) { - if ((m_bIgnoreEvents && !force) || g_pCompositor->m_bIsShuttingDown) { + if (g_pCompositor->m_bIsShuttingDown) { Debug::log(WARN, "Suppressed (ignoreevents true / shutting down) event of type %s, content: %s", event.event.c_str(), event.data.c_str()); return; } diff --git a/src/managers/EventManager.hpp b/src/managers/EventManager.hpp index dbb1e8a1..be2bf2d5 100644 --- a/src/managers/EventManager.hpp +++ b/src/managers/EventManager.hpp @@ -15,14 +15,11 @@ class CEventManager { public: CEventManager(); - void postEvent(const SHyprIPCEvent event, bool force = false); + void postEvent(const SHyprIPCEvent event); void startThread(); - bool m_bIgnoreEvents = false; - std::thread m_tThread; - private: void flushEvents(); @@ -32,4 +29,4 @@ class CEventManager { std::deque<std::pair<int, wl_event_source*>> m_dAcceptedSocketFDs; }; -inline std::unique_ptr<CEventManager> g_pEventManager;
\ No newline at end of file +inline std::unique_ptr<CEventManager> g_pEventManager; diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 31ccc478..f52c9a95 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -637,7 +637,7 @@ void CInputManager::newKeyboard(wlr_input_device* keyboard) { const auto PKEYBOARD = (SKeyboard*)owner; const auto LAYOUT = getActiveLayoutForKeyboard(PKEYBOARD); - g_pEventManager->postEvent(SHyprIPCEvent{"activelayout", PKEYBOARD->name + "," + LAYOUT}, true); // force as this should ALWAYS be sent + g_pEventManager->postEvent(SHyprIPCEvent{"activelayout", PKEYBOARD->name + "," + LAYOUT}); EMIT_HOOK_EVENT("activeLayout", (std::vector<void*>{PKEYBOARD, (void*)&LAYOUT})); }, PNEWKEYBOARD, "Keyboard"); @@ -676,7 +676,7 @@ void CInputManager::newVirtualKeyboard(wlr_input_device* keyboard) { const auto PKEYBOARD = (SKeyboard*)owner; const auto LAYOUT = getActiveLayoutForKeyboard(PKEYBOARD); - g_pEventManager->postEvent(SHyprIPCEvent{"activelayout", PKEYBOARD->name + "," + LAYOUT}, true); // force as this should ALWAYS be sent + g_pEventManager->postEvent(SHyprIPCEvent{"activelayout", PKEYBOARD->name + "," + LAYOUT}); EMIT_HOOK_EVENT("activeLayout", (std::vector<void*>{PKEYBOARD, (void*)&LAYOUT})); }, PNEWKEYBOARD, "Keyboard"); @@ -820,7 +820,7 @@ void CInputManager::applyConfigToKeyboard(SKeyboard* pKeyboard) { const auto LAYOUTSTR = getActiveLayoutForKeyboard(pKeyboard); - g_pEventManager->postEvent(SHyprIPCEvent{"activelayout", pKeyboard->name + "," + LAYOUTSTR}, true); // force as this should ALWAYS be sent + g_pEventManager->postEvent(SHyprIPCEvent{"activelayout", pKeyboard->name + "," + LAYOUTSTR}); EMIT_HOOK_EVENT("activeLayout", (std::vector<void*>{pKeyboard, (void*)&LAYOUTSTR})); Debug::log(LOG, "Set the keyboard layout to %s and variant to %s for keyboard \"%s\"", rules.layout, rules.variant, pKeyboard->keyboard->name); @@ -1106,7 +1106,7 @@ void CInputManager::onKeyboardMod(void* data, SKeyboard* pKeyboard) { const auto LAYOUT = getActiveLayoutForKeyboard(pKeyboard); - g_pEventManager->postEvent(SHyprIPCEvent{"activelayout", pKeyboard->name + "," + LAYOUT}, true); // force as this should ALWAYS be sent + g_pEventManager->postEvent(SHyprIPCEvent{"activelayout", pKeyboard->name + "," + LAYOUT}); EMIT_HOOK_EVENT("activeLayout", (std::vector<void*>{pKeyboard, (void*)&LAYOUT})); } } |
