diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-04-12 16:44:18 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-04-12 16:44:18 +0200 |
| commit | b6a93b2f0383fc8f084c7757f0f67b8c0ebeccc7 (patch) | |
| tree | 9da15dc91a16ddbbb9c32161eda96c2be4073131 /src/managers | |
| parent | 8197fded02f34e76527c0bc17cc69e4fea3cdda4 (diff) | |
Added window grouping for dwindle
furthermore, added LayoutRenderHints.
Diffstat (limited to 'src/managers')
| -rw-r--r-- | src/managers/AnimationManager.cpp | 4 | ||||
| -rw-r--r-- | src/managers/KeybindManager.cpp | 10 | ||||
| -rw-r--r-- | src/managers/KeybindManager.hpp | 2 |
3 files changed, 15 insertions, 1 deletions
diff --git a/src/managers/AnimationManager.cpp b/src/managers/AnimationManager.cpp index 4495214a..48d56148 100644 --- a/src/managers/AnimationManager.cpp +++ b/src/managers/AnimationManager.cpp @@ -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)) { diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 331273c3..54d5b605 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -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); }
\ No newline at end of file diff --git a/src/managers/KeybindManager.hpp b/src/managers/KeybindManager.hpp index de4e8fa3..edd43a26 100644 --- a/src/managers/KeybindManager.hpp +++ b/src/managers/KeybindManager.hpp @@ -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;
\ No newline at end of file |
