mirror of
https://github.com/Trensa-Organization/hy3.git
synced 2025-03-16 03:03:40 +01:00
Fix window shifting with once
moving into oppositely tiled groups
This commit is contained in:
parent
34846efb8f
commit
face71676c
1 changed files with 6 additions and 3 deletions
|
@ -1187,10 +1187,10 @@ Hy3Node* Hy3Layout::shiftOrGetFocus(Hy3Node& node, ShiftDirection direction, boo
|
||||||
if (!((!shiftIsForward(direction) && group.children.front() == break_origin)
|
if (!((!shiftIsForward(direction) && group.children.front() == break_origin)
|
||||||
|| (shiftIsForward(direction) && group.children.back() == break_origin)))
|
|| (shiftIsForward(direction) && group.children.back() == break_origin)))
|
||||||
break;
|
break;
|
||||||
|
} else {
|
||||||
|
has_broken_once = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
has_broken_once = true;
|
|
||||||
|
|
||||||
if (break_parent->parent == nullptr) {
|
if (break_parent->parent == nullptr) {
|
||||||
if (!shift) return nullptr;
|
if (!shift) return nullptr;
|
||||||
|
|
||||||
|
@ -1198,7 +1198,10 @@ Hy3Node* Hy3Layout::shiftOrGetFocus(Hy3Node& node, ShiftDirection direction, boo
|
||||||
// there's no reason to wrap the root group.
|
// there's no reason to wrap the root group.
|
||||||
if (shiftMatchesLayout(group.layout, direction)) break;
|
if (shiftMatchesLayout(group.layout, direction)) break;
|
||||||
|
|
||||||
if (group.layout != Hy3GroupLayout::Tabbed && group.children.size() == 2) {
|
if (group.layout != Hy3GroupLayout::Tabbed
|
||||||
|
&& group.children.size() == 2
|
||||||
|
&& std::find(group.children.begin(), group.children.end(), &node) != group.children.end()
|
||||||
|
) {
|
||||||
group.layout = shiftIsVertical(direction) ? Hy3GroupLayout::SplitV : Hy3GroupLayout::SplitH;
|
group.layout = shiftIsVertical(direction) ? Hy3GroupLayout::SplitV : Hy3GroupLayout::SplitH;
|
||||||
} else {
|
} else {
|
||||||
// wrap the root group in another group
|
// wrap the root group in another group
|
||||||
|
|
Loading…
Add table
Reference in a new issue