From f2a848cbcc41f29fb62ee67aef95136ae1a650da Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sun, 7 Apr 2024 03:31:51 +0100 Subject: core: Event loop rework (#5466) * Event loop rework * revert missed --- src/Compositor.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Compositor.cpp') diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 6c0025ea..746011ef 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -2,6 +2,7 @@ #include "helpers/Splashes.hpp" #include "config/ConfigValue.hpp" #include "managers/CursorManager.hpp" +#include "managers/eventLoop/EventLoopManager.hpp" #include #include #include "debug/HyprCtl.hpp" @@ -453,6 +454,9 @@ void CCompositor::cleanup() { void CCompositor::initManagers(eManagersInitStage stage) { switch (stage) { case STAGE_PRIORITY: { + Debug::log(LOG, "Creating the EventLoopManager!"); + g_pEventLoopManager = std::make_unique(); + Debug::log(LOG, "Creating the HookSystem!"); g_pHookSystem = std::make_unique(); @@ -628,7 +632,7 @@ void CCompositor::startCompositor() { // This blocks until we are done. Debug::log(LOG, "Hyprland is ready, running the event loop!"); - wl_display_run(m_sWLDisplay); + g_pEventLoopManager->enterLoop(m_sWLDisplay, m_sWLEventLoop); } CMonitor* CCompositor::getMonitorFromID(const int& id) { -- cgit v1.2.3