summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2024-04-07 03:31:51 +0100
committerGitHub <noreply@github.com>2024-04-07 03:31:51 +0100
commitf2a848cbcc41f29fb62ee67aef95136ae1a650da (patch)
tree6af50d58aa94fbb48880694a76f6edb79fa370ed /src/Compositor.cpp
parent9f1604e4b0afec40cfa9bc095d6613a7f749b2c1 (diff)
core: Event loop rework (#5466)
* Event loop rework * revert missed
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp6
1 files changed, 5 insertions, 1 deletions
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 <random>
#include <unordered_set>
#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<CEventLoopManager>();
+
Debug::log(LOG, "Creating the HookSystem!");
g_pHookSystem = std::make_unique<CHookSystemManager>();
@@ -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) {