mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 16:05:58 +01:00
clarify layout enum
This commit is contained in:
parent
cd08fa22fd
commit
17b4a2786d
2 changed files with 10 additions and 11 deletions
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
IHyprLayout* CLayoutManager::getCurrentLayout() {
|
IHyprLayout* CLayoutManager::getCurrentLayout() {
|
||||||
switch (m_iCurrentLayoutID) {
|
switch (m_iCurrentLayoutID) {
|
||||||
case DWINDLE: return &m_cDwindleLayout;
|
case LAYOUT_DWINDLE: return &m_cDwindleLayout;
|
||||||
case MASTER: return &m_cMasterLayout;
|
case LAYOUT_MASTER: return &m_cMasterLayout;
|
||||||
}
|
}
|
||||||
|
|
||||||
// fallback
|
// fallback
|
||||||
|
@ -12,15 +12,15 @@ IHyprLayout* CLayoutManager::getCurrentLayout() {
|
||||||
|
|
||||||
void CLayoutManager::switchToLayout(std::string layout) {
|
void CLayoutManager::switchToLayout(std::string layout) {
|
||||||
if (layout == "dwindle") {
|
if (layout == "dwindle") {
|
||||||
if (m_iCurrentLayoutID != DWINDLE) {
|
if (m_iCurrentLayoutID != LAYOUT_DWINDLE) {
|
||||||
getCurrentLayout()->onDisable();
|
getCurrentLayout()->onDisable();
|
||||||
m_iCurrentLayoutID = DWINDLE;
|
m_iCurrentLayoutID = LAYOUT_DWINDLE;
|
||||||
getCurrentLayout()->onEnable();
|
getCurrentLayout()->onEnable();
|
||||||
}
|
}
|
||||||
} else if (layout == "master") {
|
} else if (layout == "master") {
|
||||||
if (m_iCurrentLayoutID != MASTER) {
|
if (m_iCurrentLayoutID != LAYOUT_MASTER) {
|
||||||
getCurrentLayout()->onDisable();
|
getCurrentLayout()->onDisable();
|
||||||
m_iCurrentLayoutID = MASTER;
|
m_iCurrentLayoutID = LAYOUT_MASTER;
|
||||||
getCurrentLayout()->onEnable();
|
getCurrentLayout()->onEnable();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -10,13 +10,12 @@ class CLayoutManager {
|
||||||
void switchToLayout(std::string);
|
void switchToLayout(std::string);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum HYPRLAYOUTS
|
enum HYPRLAYOUTS {
|
||||||
{
|
LAYOUT_DWINDLE = 0,
|
||||||
DWINDLE = 0,
|
LAYOUT_MASTER
|
||||||
MASTER
|
|
||||||
};
|
};
|
||||||
|
|
||||||
HYPRLAYOUTS m_iCurrentLayoutID = DWINDLE;
|
HYPRLAYOUTS m_iCurrentLayoutID = LAYOUT_DWINDLE;
|
||||||
|
|
||||||
CHyprDwindleLayout m_cDwindleLayout;
|
CHyprDwindleLayout m_cDwindleLayout;
|
||||||
CHyprMasterLayout m_cMasterLayout;
|
CHyprMasterLayout m_cMasterLayout;
|
||||||
|
|
Loading…
Reference in a new issue