mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 09:45:59 +01:00
parent
88b47dfa83
commit
0f6e530798
4 changed files with 29 additions and 22 deletions
|
@ -119,7 +119,7 @@ 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)
|
if (PWINDOW->m_bIsFullscreen && !pNode->ignoreFullscreenChecks)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
PWINDOW->updateSpecialRenderData();
|
PWINDOW->updateSpecialRenderData();
|
||||||
|
@ -563,8 +563,9 @@ void CHyprDwindleLayout::recalculateMonitor(const int& monid) {
|
||||||
fakeNode.workspaceID = PWORKSPACE->m_iID;
|
fakeNode.workspaceID = PWORKSPACE->m_iID;
|
||||||
PFULLWINDOW->m_vPosition = fakeNode.position;
|
PFULLWINDOW->m_vPosition = fakeNode.position;
|
||||||
PFULLWINDOW->m_vSize = fakeNode.size;
|
PFULLWINDOW->m_vSize = fakeNode.size;
|
||||||
|
fakeNode.ignoreFullscreenChecks = true;
|
||||||
|
|
||||||
applyNodeDataToWindow(&fakeNode, true);
|
applyNodeDataToWindow(&fakeNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -30,6 +30,8 @@ struct SDwindleNodeData {
|
||||||
|
|
||||||
bool valid = true;
|
bool valid = true;
|
||||||
|
|
||||||
|
bool ignoreFullscreenChecks = false;
|
||||||
|
|
||||||
// For list lookup
|
// For list lookup
|
||||||
bool operator==(const SDwindleNodeData& rhs) const {
|
bool operator==(const SDwindleNodeData& rhs) const {
|
||||||
return pWindow == rhs.pWindow && workspaceID == rhs.workspaceID && position == rhs.position && size == rhs.size && pParent == rhs.pParent &&
|
return pWindow == rhs.pWindow && workspaceID == rhs.workspaceID && position == rhs.position && size == rhs.size && pParent == rhs.pParent &&
|
||||||
|
|
|
@ -566,7 +566,7 @@ void CHyprMasterLayout::calculateWorkspace(const int& ws) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHyprMasterLayout::applyNodeDataToWindow(SMasterNodeData* pNode, bool force) {
|
void CHyprMasterLayout::applyNodeDataToWindow(SMasterNodeData* pNode) {
|
||||||
CMonitor* PMONITOR = nullptr;
|
CMonitor* PMONITOR = nullptr;
|
||||||
|
|
||||||
if (g_pCompositor->isWorkspaceSpecial(pNode->workspaceID)) {
|
if (g_pCompositor->isWorkspaceSpecial(pNode->workspaceID)) {
|
||||||
|
@ -596,7 +596,7 @@ void CHyprMasterLayout::applyNodeDataToWindow(SMasterNodeData* pNode, bool force
|
||||||
// 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)
|
if (PWINDOW->m_bIsFullscreen && !pNode->ignoreFullscreenChecks)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
PWINDOW->updateSpecialRenderData();
|
PWINDOW->updateSpecialRenderData();
|
||||||
|
@ -891,8 +891,9 @@ void CHyprMasterLayout::fullscreenRequestForWindow(CWindow* pWindow, eFullscreen
|
||||||
fakeNode.workspaceID = pWindow->m_iWorkspaceID;
|
fakeNode.workspaceID = pWindow->m_iWorkspaceID;
|
||||||
pWindow->m_vPosition = fakeNode.position;
|
pWindow->m_vPosition = fakeNode.position;
|
||||||
pWindow->m_vSize = fakeNode.size;
|
pWindow->m_vSize = fakeNode.size;
|
||||||
|
fakeNode.ignoreFullscreenChecks = true;
|
||||||
|
|
||||||
applyNodeDataToWindow(&fakeNode, true);
|
applyNodeDataToWindow(&fakeNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,7 @@
|
||||||
enum eFullscreenMode : int8_t;
|
enum eFullscreenMode : int8_t;
|
||||||
|
|
||||||
//orientation determines which side of the screen the master area resides
|
//orientation determines which side of the screen the master area resides
|
||||||
enum eOrientation : uint8_t
|
enum eOrientation : uint8_t {
|
||||||
{
|
|
||||||
ORIENTATION_LEFT = 0,
|
ORIENTATION_LEFT = 0,
|
||||||
ORIENTATION_TOP,
|
ORIENTATION_TOP,
|
||||||
ORIENTATION_RIGHT,
|
ORIENTATION_RIGHT,
|
||||||
|
@ -32,6 +31,9 @@ struct SMasterNodeData {
|
||||||
|
|
||||||
int workspaceID = -1;
|
int workspaceID = -1;
|
||||||
|
|
||||||
|
bool ignoreFullscreenChecks = false;
|
||||||
|
|
||||||
|
//
|
||||||
bool operator==(const SMasterNodeData& rhs) const {
|
bool operator==(const SMasterNodeData& rhs) const {
|
||||||
return pWindow == rhs.pWindow;
|
return pWindow == rhs.pWindow;
|
||||||
}
|
}
|
||||||
|
@ -41,6 +43,7 @@ struct SMasterWorkspaceData {
|
||||||
int workspaceID = -1;
|
int workspaceID = -1;
|
||||||
eOrientation orientation = ORIENTATION_LEFT;
|
eOrientation orientation = ORIENTATION_LEFT;
|
||||||
|
|
||||||
|
//
|
||||||
bool operator==(const SMasterWorkspaceData& rhs) const {
|
bool operator==(const SMasterWorkspaceData& rhs) const {
|
||||||
return workspaceID == rhs.workspaceID;
|
return workspaceID == rhs.workspaceID;
|
||||||
}
|
}
|
||||||
|
@ -76,7 +79,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*, bool force = false);
|
void applyNodeDataToWindow(SMasterNodeData*);
|
||||||
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