mirror of
https://github.com/hyprwm/Hyprland
synced 2025-02-18 11:02:54 +01:00
Slightly better behavior with LRTB master layouts (still has issues)
This commit is contained in:
parent
bb37d53603
commit
2d758dfd96
1 changed files with 2 additions and 6 deletions
|
@ -577,16 +577,12 @@ void CHyprMasterLayout::resizeActiveWindow(const Vector2D& pixResize, CWindow* p
|
|||
case ORIENTATION_TOP: delta = pixResize.y / PMONITOR->vecSize.y; break;
|
||||
case ORIENTATION_CENTER:
|
||||
delta = pixResize.x / PMONITOR->vecSize.x;
|
||||
if (!PNODE->isMaster)
|
||||
// Need to account for slave windows on both sides of master
|
||||
delta *= 2.0;
|
||||
// Need to account for slave windows on both sides of master
|
||||
delta = PNODE->isMaster ? delta : delta * -2.0;
|
||||
break;
|
||||
default: UNREACHABLE();
|
||||
}
|
||||
|
||||
if (!PNODE->isMaster)
|
||||
delta *= -1.0;
|
||||
|
||||
for (auto& n : m_lMasterNodesData) {
|
||||
if (n.isMaster && n.workspaceID == PMONITOR->activeWorkspace)
|
||||
n.percMaster = std::clamp(n.percMaster + delta, 0.05, 0.95);
|
||||
|
|
Loading…
Add table
Reference in a new issue