summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-03-19 17:48:18 +0100
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-03-19 17:48:18 +0100
commitf9a4e9aecd2f38d0f82f24ac2dd4a1f9d4d84045 (patch)
treebfc784c918da55993f7635172aa7ce83348fa5f8 /src/Compositor.cpp
parentdba7bbdcf35a123e6106b420d9cc6064528080e0 (diff)
basic keybinds
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp13
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) {