mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-07-31 20:21:54 -07:00
master: respect the resizing animation option in master layout (#3300)
This commit is contained in:
@@ -572,6 +572,7 @@ void CHyprMasterLayout::applyNodeDataToWindow(SMasterNodeData* pNode) {
|
|||||||
static auto* const PGAPSIN = &g_pConfigManager->getConfigValuePtr("general:gaps_in")->intValue;
|
static auto* const PGAPSIN = &g_pConfigManager->getConfigValuePtr("general:gaps_in")->intValue;
|
||||||
static auto* const PGAPSOUT = &g_pConfigManager->getConfigValuePtr("general:gaps_out")->intValue;
|
static auto* const PGAPSOUT = &g_pConfigManager->getConfigValuePtr("general:gaps_out")->intValue;
|
||||||
static auto* const PNOGAPSWHENONLY = &g_pConfigManager->getConfigValuePtr("master:no_gaps_when_only")->intValue;
|
static auto* const PNOGAPSWHENONLY = &g_pConfigManager->getConfigValuePtr("master:no_gaps_when_only")->intValue;
|
||||||
|
static auto* const PANIMATE = &g_pConfigManager->getConfigValuePtr("misc:animate_manual_resizes")->intValue;
|
||||||
|
|
||||||
auto gapsIn = WORKSPACERULE.gapsIn.value_or(*PGAPSIN);
|
auto gapsIn = WORKSPACERULE.gapsIn.value_or(*PGAPSIN);
|
||||||
auto gapsOut = WORKSPACERULE.gapsOut.value_or(*PGAPSOUT);
|
auto gapsOut = WORKSPACERULE.gapsOut.value_or(*PGAPSOUT);
|
||||||
@@ -635,7 +636,7 @@ void CHyprMasterLayout::applyNodeDataToWindow(SMasterNodeData* pNode) {
|
|||||||
g_pXWaylandManager->setWindowSize(PWINDOW, calcSize);
|
g_pXWaylandManager->setWindowSize(PWINDOW, calcSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_bForceWarps) {
|
if (!*PANIMATE) {
|
||||||
g_pHyprRenderer->damageWindow(PWINDOW);
|
g_pHyprRenderer->damageWindow(PWINDOW);
|
||||||
|
|
||||||
PWINDOW->m_vRealPosition.warp();
|
PWINDOW->m_vRealPosition.warp();
|
||||||
@@ -690,8 +691,6 @@ void CHyprMasterLayout::resizeActiveWindow(const Vector2D& pixResize, eRectCorne
|
|||||||
if (getNodesOnWorkspace(PWINDOW->m_iWorkspaceID) == 1 && !centered)
|
if (getNodesOnWorkspace(PWINDOW->m_iWorkspaceID) == 1 && !centered)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_bForceWarps = true;
|
|
||||||
|
|
||||||
switch (orientation) {
|
switch (orientation) {
|
||||||
case ORIENTATION_LEFT: delta = pixResize.x / PMONITOR->vecSize.x; break;
|
case ORIENTATION_LEFT: delta = pixResize.x / PMONITOR->vecSize.x; break;
|
||||||
case ORIENTATION_RIGHT: delta = -pixResize.x / PMONITOR->vecSize.x; break;
|
case ORIENTATION_RIGHT: delta = -pixResize.x / PMONITOR->vecSize.x; break;
|
||||||
@@ -789,8 +788,6 @@ void CHyprMasterLayout::resizeActiveWindow(const Vector2D& pixResize, eRectCorne
|
|||||||
}
|
}
|
||||||
|
|
||||||
recalculateMonitor(PMONITOR->ID);
|
recalculateMonitor(PMONITOR->ID);
|
||||||
|
|
||||||
m_bForceWarps = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHyprMasterLayout::fullscreenRequestForWindow(CWindow* pWindow, eFullscreenMode fullscreenMode, bool on) {
|
void CHyprMasterLayout::fullscreenRequestForWindow(CWindow* pWindow, eFullscreenMode fullscreenMode, bool on) {
|
||||||
|
@@ -70,8 +70,6 @@ class CHyprMasterLayout : public IHyprLayout {
|
|||||||
std::list<SMasterNodeData> m_lMasterNodesData;
|
std::list<SMasterNodeData> m_lMasterNodesData;
|
||||||
std::vector<SMasterWorkspaceData> m_lMasterWorkspacesData;
|
std::vector<SMasterWorkspaceData> m_lMasterWorkspacesData;
|
||||||
|
|
||||||
bool m_bForceWarps = false;
|
|
||||||
|
|
||||||
void buildOrientationCycleVectorFromVars(std::vector<eOrientation>& cycle, CVarList& vars);
|
void buildOrientationCycleVectorFromVars(std::vector<eOrientation>& cycle, CVarList& vars);
|
||||||
void buildOrientationCycleVectorFromEOperation(std::vector<eOrientation>& cycle);
|
void buildOrientationCycleVectorFromEOperation(std::vector<eOrientation>& cycle);
|
||||||
void runOrientationCycle(SLayoutMessageHeader& header, CVarList* vars, int next);
|
void runOrientationCycle(SLayoutMessageHeader& header, CVarList* vars, int next);
|
||||||
|
Reference in New Issue
Block a user