mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 20:25:59 +01:00
Added circlenext
This commit is contained in:
parent
c451e13e4f
commit
c6953329d5
2 changed files with 14 additions and 1 deletions
|
@ -26,6 +26,7 @@ CKeybindManager::CKeybindManager() {
|
||||||
m_mDispatchers["togglespecialworkspace"] = toggleSpecialWorkspace;
|
m_mDispatchers["togglespecialworkspace"] = toggleSpecialWorkspace;
|
||||||
m_mDispatchers["forcerendererreload"] = forceRendererReload;
|
m_mDispatchers["forcerendererreload"] = forceRendererReload;
|
||||||
m_mDispatchers["resizeactive"] = resizeActive;
|
m_mDispatchers["resizeactive"] = resizeActive;
|
||||||
|
m_mDispatchers["circlenext"] = circleNext;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CKeybindManager::addKeybind(SKeybind kb) {
|
void CKeybindManager::addKeybind(SKeybind kb) {
|
||||||
|
@ -868,4 +869,15 @@ void CKeybindManager::resizeActive(std::string args) {
|
||||||
const int Y = std::stoi(y);
|
const int Y = std::stoi(y);
|
||||||
|
|
||||||
g_pLayoutManager->getCurrentLayout()->resizeActiveWindow(Vector2D(X, Y));
|
g_pLayoutManager->getCurrentLayout()->resizeActiveWindow(Vector2D(X, Y));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CKeybindManager::circleNext(std::string) {
|
||||||
|
if (!g_pCompositor->windowValidMapped(g_pCompositor->m_pLastWindow))
|
||||||
|
return;
|
||||||
|
|
||||||
|
g_pCompositor->focusWindow(g_pCompositor->getNextWindowOnWorkspace(g_pCompositor->m_pLastWindow));
|
||||||
|
|
||||||
|
const auto MIDPOINT = g_pCompositor->m_pLastWindow->m_vRealPosition.goalv() + g_pCompositor->m_pLastWindow->m_vRealSize.goalv() / 2.f;
|
||||||
|
|
||||||
|
wlr_cursor_warp(g_pCompositor->m_sWLRCursor, nullptr, MIDPOINT.x, MIDPOINT.y);
|
||||||
|
}
|
||||||
|
|
|
@ -56,6 +56,7 @@ private:
|
||||||
static void toggleSpecialWorkspace(std::string);
|
static void toggleSpecialWorkspace(std::string);
|
||||||
static void forceRendererReload(std::string);
|
static void forceRendererReload(std::string);
|
||||||
static void resizeActive(std::string);
|
static void resizeActive(std::string);
|
||||||
|
static void circleNext(std::string);
|
||||||
|
|
||||||
friend class CCompositor;
|
friend class CCompositor;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue