Added window grouping for dwindle

furthermore, added LayoutRenderHints.
This commit is contained in:
vaxerski 2022-04-12 16:44:18 +02:00
parent 8197fded02
commit b6a93b2f03
10 changed files with 221 additions and 18 deletions

View file

@ -52,7 +52,9 @@ void CAnimationManager::tick() {
continue;
// process the borders
const auto& COLOR = g_pCompositor->isWindowActive(&w) ? BORDERACTIVECOL : BORDERINACTIVECOL;
const auto RENDERHINTS = g_pLayoutManager->getCurrentLayout()->requestRenderHints(&w);
const auto& COLOR = RENDERHINTS.isBorderColor ? RENDERHINTS.borderColor : g_pCompositor->isWindowActive(&w) ? BORDERACTIVECOL : BORDERINACTIVECOL;
if (BORDERSENABLED) {
if (!deltazero(COLOR, w.m_cRealBorderColor)) {

View file

@ -54,6 +54,8 @@ bool CKeybindManager::handleKeybinds(const uint32_t& modmask, const xkb_keysym_t
else if (k.handler == "movetoworkspace") { moveActiveToWorkspace(k.arg); }
else if (k.handler == "pseudo") { toggleActivePseudo(k.arg); }
else if (k.handler == "movefocus") { moveFocusTo(k.arg); }
else if (k.handler == "togglegroup") { toggleGroup(k.arg); }
else if (k.handler == "changegroupactive") { changeGroupActive(k.arg); }
found = true;
}
@ -289,4 +291,12 @@ void CKeybindManager::moveFocusTo(std::string args) {
Vector2D middle = PWINDOWTOCHANGETO->m_vPosition + PWINDOWTOCHANGETO->m_vSize / 2.f;
wlr_cursor_warp(g_pCompositor->m_sWLRCursor, nullptr, middle.x, middle.y);
}
}
void CKeybindManager::toggleGroup(std::string args) {
g_pLayoutManager->getCurrentLayout()->toggleWindowGroup(g_pCompositor->m_pLastWindow);
}
void CKeybindManager::changeGroupActive(std::string args) {
g_pLayoutManager->getCurrentLayout()->switchGroupWindow(g_pCompositor->m_pLastWindow);
}

View file

@ -32,6 +32,8 @@ private:
void fullscreenActive(std::string);
void moveActiveToWorkspace(std::string);
void moveFocusTo(std::string);
void toggleGroup(std::string);
void changeGroupActive(std::string);
};
inline std::unique_ptr<CKeybindManager> g_pKeybindManager;