mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 14:49:48 +01:00
layout: avoid redundant size sets on new fullscreen
This commit is contained in:
parent
6914103289
commit
7b32b4214d
3 changed files with 10 additions and 4 deletions
|
@ -119,6 +119,9 @@ void CHyprDwindleLayout::applyNodeDataToWindow(SDwindleNodeData* pNode, bool for
|
||||||
// if user specified them in config
|
// if user specified them in config
|
||||||
const auto WORKSPACERULE = g_pConfigManager->getWorkspaceRuleFor(g_pCompositor->getWorkspaceByID(PWINDOW->m_iWorkspaceID));
|
const auto WORKSPACERULE = g_pConfigManager->getWorkspaceRuleFor(g_pCompositor->getWorkspaceByID(PWINDOW->m_iWorkspaceID));
|
||||||
|
|
||||||
|
if (PWINDOW->m_bIsFullscreen && !force)
|
||||||
|
return;
|
||||||
|
|
||||||
PWINDOW->updateSpecialRenderData();
|
PWINDOW->updateSpecialRenderData();
|
||||||
|
|
||||||
static auto* const PGAPSIN = &g_pConfigManager->getConfigValuePtr("general:gaps_in")->intValue;
|
static auto* const PGAPSIN = &g_pConfigManager->getConfigValuePtr("general:gaps_in")->intValue;
|
||||||
|
@ -561,7 +564,7 @@ void CHyprDwindleLayout::recalculateMonitor(const int& monid) {
|
||||||
PFULLWINDOW->m_vPosition = fakeNode.position;
|
PFULLWINDOW->m_vPosition = fakeNode.position;
|
||||||
PFULLWINDOW->m_vSize = fakeNode.size;
|
PFULLWINDOW->m_vSize = fakeNode.size;
|
||||||
|
|
||||||
applyNodeDataToWindow(&fakeNode);
|
applyNodeDataToWindow(&fakeNode, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -566,7 +566,7 @@ void CHyprMasterLayout::calculateWorkspace(const int& ws) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHyprMasterLayout::applyNodeDataToWindow(SMasterNodeData* pNode) {
|
void CHyprMasterLayout::applyNodeDataToWindow(SMasterNodeData* pNode, bool force) {
|
||||||
CMonitor* PMONITOR = nullptr;
|
CMonitor* PMONITOR = nullptr;
|
||||||
|
|
||||||
if (g_pCompositor->isWorkspaceSpecial(pNode->workspaceID)) {
|
if (g_pCompositor->isWorkspaceSpecial(pNode->workspaceID)) {
|
||||||
|
@ -596,6 +596,9 @@ void CHyprMasterLayout::applyNodeDataToWindow(SMasterNodeData* pNode) {
|
||||||
// if user specified them in config
|
// if user specified them in config
|
||||||
const auto WORKSPACERULE = g_pConfigManager->getWorkspaceRuleFor(g_pCompositor->getWorkspaceByID(PWINDOW->m_iWorkspaceID));
|
const auto WORKSPACERULE = g_pConfigManager->getWorkspaceRuleFor(g_pCompositor->getWorkspaceByID(PWINDOW->m_iWorkspaceID));
|
||||||
|
|
||||||
|
if (PWINDOW->m_bIsFullscreen && !force)
|
||||||
|
return;
|
||||||
|
|
||||||
PWINDOW->updateSpecialRenderData();
|
PWINDOW->updateSpecialRenderData();
|
||||||
|
|
||||||
static auto* const PGAPSIN = &g_pConfigManager->getConfigValuePtr("general:gaps_in")->intValue;
|
static auto* const PGAPSIN = &g_pConfigManager->getConfigValuePtr("general:gaps_in")->intValue;
|
||||||
|
@ -889,7 +892,7 @@ void CHyprMasterLayout::fullscreenRequestForWindow(CWindow* pWindow, eFullscreen
|
||||||
pWindow->m_vPosition = fakeNode.position;
|
pWindow->m_vPosition = fakeNode.position;
|
||||||
pWindow->m_vSize = fakeNode.size;
|
pWindow->m_vSize = fakeNode.size;
|
||||||
|
|
||||||
applyNodeDataToWindow(&fakeNode);
|
applyNodeDataToWindow(&fakeNode, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ class CHyprMasterLayout : public IHyprLayout {
|
||||||
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);
|
||||||
int getNodesOnWorkspace(const int&);
|
int getNodesOnWorkspace(const int&);
|
||||||
void applyNodeDataToWindow(SMasterNodeData*);
|
void applyNodeDataToWindow(SMasterNodeData*, bool force = false);
|
||||||
SMasterNodeData* getNodeFromWindow(CWindow*);
|
SMasterNodeData* getNodeFromWindow(CWindow*);
|
||||||
SMasterNodeData* getMasterNodeOnWorkspace(const int&);
|
SMasterNodeData* getMasterNodeOnWorkspace(const int&);
|
||||||
SMasterWorkspaceData* getMasterWorkspaceData(const int&);
|
SMasterWorkspaceData* getMasterWorkspaceData(const int&);
|
||||||
|
|
Loading…
Reference in a new issue