mirror of
https://github.com/Trensa-Organization/hy3.git
synced 2025-03-16 03:03:40 +01:00
Force root recalc when selection changes
Fixes bugs related to window hidden state and tab groups
This commit is contained in:
parent
45d0c20cba
commit
d99df236c5
1 changed files with 4 additions and 5 deletions
|
@ -882,11 +882,9 @@ void Hy3Layout::onWindowFocusChange(CWindow* window) {
|
||||||
auto* node = this->getNodeFromWindow(window);
|
auto* node = this->getNodeFromWindow(window);
|
||||||
if (node == nullptr) return;
|
if (node == nullptr) return;
|
||||||
|
|
||||||
if (node->parent != nullptr && node->parent->data.as_group.layout == Hy3GroupLayout::Tabbed) {
|
|
||||||
node->parent->recalcSizePosRecursive();
|
|
||||||
}
|
|
||||||
|
|
||||||
node->markFocused();
|
node->markFocused();
|
||||||
|
while (node->parent != nullptr) node = node->parent;
|
||||||
|
node->recalcSizePosRecursive();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Hy3Layout::isWindowTiled(CWindow* window) {
|
bool Hy3Layout::isWindowTiled(CWindow* window) {
|
||||||
|
@ -1347,6 +1345,8 @@ void Hy3Layout::shiftFocus(int workspace, ShiftDirection direction) {
|
||||||
Hy3Node* target;
|
Hy3Node* target;
|
||||||
if ((target = this->shiftOrGetFocus(*node, direction, false, false))) {
|
if ((target = this->shiftOrGetFocus(*node, direction, false, false))) {
|
||||||
target->focus();
|
target->focus();
|
||||||
|
while (target->parent != nullptr) target = target->parent;
|
||||||
|
target->recalcSizePosRecursive();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1384,7 +1384,6 @@ Hy3Node* Hy3Layout::shiftOrGetFocus(Hy3Node& node, ShiftDirection direction, boo
|
||||||
|
|
||||||
auto& group = break_parent->data.as_group; // must be a group in order to be a parent
|
auto& group = break_parent->data.as_group; // must be a group in order to be a parent
|
||||||
|
|
||||||
|
|
||||||
if (shiftMatchesLayout(group.layout, direction)) {
|
if (shiftMatchesLayout(group.layout, direction)) {
|
||||||
// group has the correct orientation
|
// group has the correct orientation
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue