fix: incorrect usage of as_group without check in focus_tab

Closes #106
This commit is contained in:
outfoxxed 2024-05-08 15:27:45 -07:00
parent ca420ab45d
commit 33c8d761ff
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E
2 changed files with 4 additions and 4 deletions

View file

@ -1178,7 +1178,9 @@ void Hy3Layout::focusTab(
tab_node = this->getWorkspaceFocusedNode(workspace); tab_node = this->getWorkspaceFocusedNode(workspace);
if (tab_node == nullptr) return; if (tab_node == nullptr) return;
while (tab_node != nullptr && tab_node->data.as_group().layout != Hy3GroupLayout::Tabbed while (tab_node != nullptr
&& (tab_node->data.is_window()
|| tab_node->data.as_group().layout != Hy3GroupLayout::Tabbed)
&& tab_node->parent != nullptr) && tab_node->parent != nullptr)
tab_node = tab_node->parent; tab_node = tab_node->parent;

View file

@ -129,9 +129,7 @@ void dispatch_movefocus(std::string value) {
g_Hy3Layout->shiftFocus(workspace, shift.value(), visible, warp_cursor); g_Hy3Layout->shiftFocus(workspace, shift.value(), visible, warp_cursor);
} }
void dispatch_warpcursor(std::string value) { void dispatch_warpcursor(std::string value) { g_Hy3Layout->warpCursor(); }
g_Hy3Layout->warpCursor();
}
void dispatch_move_to_workspace(std::string value) { void dispatch_move_to_workspace(std::string value) {
auto origin_workspace = workspace_for_action(true); auto origin_workspace = workspace_for_action(true);