mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 15:45:59 +01:00
dwindle: round wbox before setting
This commit is contained in:
parent
2a002f31e4
commit
0608791480
1 changed files with 10 additions and 5 deletions
|
@ -226,10 +226,13 @@ void CHyprDwindleLayout::applyNodeDataToWindow(SDwindleNodeData* pNode, bool for
|
||||||
|
|
||||||
g_pXWaylandManager->setWindowSize(PWINDOW, wb.size());
|
g_pXWaylandManager->setWindowSize(PWINDOW, wb.size());
|
||||||
} else {
|
} else {
|
||||||
PWINDOW->m_vRealSize = calcSize;
|
CBox wb = {calcPos, calcSize};
|
||||||
PWINDOW->m_vRealPosition = calcPos;
|
wb.round(); // avoid rounding mess
|
||||||
|
|
||||||
g_pXWaylandManager->setWindowSize(PWINDOW, calcSize);
|
PWINDOW->m_vRealSize = wb.size();
|
||||||
|
PWINDOW->m_vRealPosition = wb.pos();
|
||||||
|
|
||||||
|
g_pXWaylandManager->setWindowSize(PWINDOW, wb.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (force) {
|
if (force) {
|
||||||
|
@ -645,8 +648,10 @@ void CHyprDwindleLayout::resizeActiveWindow(const Vector2D& pixResize, eRectCorn
|
||||||
else
|
else
|
||||||
PWINDOW->m_vPseudoSize.y -= pixResize.y * 2;
|
PWINDOW->m_vPseudoSize.y -= pixResize.y * 2;
|
||||||
|
|
||||||
PWINDOW->m_vPseudoSize.x = std::clamp(PWINDOW->m_vPseudoSize.x, 30.0, PNODE->box.w);
|
CBox wbox = PNODE->box;
|
||||||
PWINDOW->m_vPseudoSize.y = std::clamp(PWINDOW->m_vPseudoSize.y, 30.0, PNODE->box.h);
|
wbox.round();
|
||||||
|
|
||||||
|
PWINDOW->m_vPseudoSize = {std::clamp(PWINDOW->m_vPseudoSize.x, 30.0, wbox.w), std::clamp(PWINDOW->m_vPseudoSize.y, 30.0, wbox.h)};
|
||||||
|
|
||||||
PWINDOW->m_vLastFloatingSize = PWINDOW->m_vPseudoSize;
|
PWINDOW->m_vLastFloatingSize = PWINDOW->m_vPseudoSize;
|
||||||
PNODE->recalcSizePosRecursive(*PANIMATE == 0);
|
PNODE->recalcSizePosRecursive(*PANIMATE == 0);
|
||||||
|
|
Loading…
Reference in a new issue