diff options
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index c0059836..228723ca 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -95,6 +95,9 @@ void CCompositor::startCompositor() { // Init all the managers BEFORE we start with the wayland server so that ALL of the stuff is initialized // properly and we dont get any bad mem reads. // + Debug::log(LOG, "Creating the KeybindManager!"); + g_pKeybindManager = std::make_unique<CKeybindManager>(); + Debug::log(LOG, "Creating the ConfigManager!"); g_pConfigManager = std::make_unique<CConfigManager>(); @@ -196,6 +199,16 @@ CWindow* CCompositor::vectorToWindow(const Vector2D& pos) { return nullptr; } +CWindow* CCompositor::vectorToWindowIdeal(const Vector2D& pos) { + for (auto& w : m_lWindows) { + wlr_box box = {w.m_vPosition.x, w.m_vPosition.y, w.m_vSize.x, w.m_vSize.y}; + if (wlr_box_contains_point(&box, pos.x, pos.y)) + return &w; + } + + return nullptr; +} + void CCompositor::focusWindow(CWindow* pWindow) { if (!pWindow) { |
