mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-05 14:42:01 -07:00
basic keybinds
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user