mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 09:09:48 +01:00
internal: minor style fixes
This commit is contained in:
parent
2295bbdd80
commit
cabdf38ce4
2 changed files with 11 additions and 15 deletions
|
@ -1830,9 +1830,8 @@ void CKeybindManager::dpms(std::string arg) {
|
||||||
bool enable = arg.find("on") == 0;
|
bool enable = arg.find("on") == 0;
|
||||||
std::string port = "";
|
std::string port = "";
|
||||||
|
|
||||||
if (arg.find_first_of(' ') != std::string::npos) {
|
if (arg.find_first_of(' ') != std::string::npos)
|
||||||
port = arg.substr(arg.find_first_of(' ') + 1);
|
port = arg.substr(arg.find_first_of(' ') + 1);
|
||||||
}
|
|
||||||
|
|
||||||
for (auto& m : g_pCompositor->m_vMonitors) {
|
for (auto& m : g_pCompositor->m_vMonitors) {
|
||||||
|
|
||||||
|
@ -1905,11 +1904,10 @@ void CKeybindManager::pinActive(std::string args) {
|
||||||
|
|
||||||
CWindow* PWINDOW = nullptr;
|
CWindow* PWINDOW = nullptr;
|
||||||
|
|
||||||
if (args != "" && args != "active" && args.length() > 1) {
|
if (args != "" && args != "active" && args.length() > 1)
|
||||||
PWINDOW = g_pCompositor->getWindowByRegex(args);
|
PWINDOW = g_pCompositor->getWindowByRegex(args);
|
||||||
} else {
|
else
|
||||||
PWINDOW = g_pCompositor->m_pLastWindow;
|
PWINDOW = g_pCompositor->m_pLastWindow;
|
||||||
}
|
|
||||||
|
|
||||||
if (!PWINDOW) {
|
if (!PWINDOW) {
|
||||||
Debug::log(ERR, "pin: window not found");
|
Debug::log(ERR, "pin: window not found");
|
||||||
|
@ -1986,13 +1984,12 @@ void CKeybindManager::fakeFullscreenActive(std::string args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CKeybindManager::lockGroups(std::string args) {
|
void CKeybindManager::lockGroups(std::string args) {
|
||||||
if (args == "lock" || args.empty() || args == "lockgroups") {
|
if (args == "lock" || args.empty() || args == "lockgroups")
|
||||||
g_pKeybindManager->m_bGroupsLocked = true;
|
g_pKeybindManager->m_bGroupsLocked = true;
|
||||||
} else if (args == "toggle") {
|
else if (args == "toggle")
|
||||||
g_pKeybindManager->m_bGroupsLocked = !g_pKeybindManager->m_bGroupsLocked;
|
g_pKeybindManager->m_bGroupsLocked = !g_pKeybindManager->m_bGroupsLocked;
|
||||||
} else {
|
else
|
||||||
g_pKeybindManager->m_bGroupsLocked = false;
|
g_pKeybindManager->m_bGroupsLocked = false;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CKeybindManager::lockActiveGroup(std::string args) {
|
void CKeybindManager::lockActiveGroup(std::string args) {
|
||||||
|
@ -2000,15 +1997,15 @@ void CKeybindManager::lockActiveGroup(std::string args) {
|
||||||
|
|
||||||
if (!PWINDOW || !PWINDOW->m_sGroupData.pNextWindow)
|
if (!PWINDOW || !PWINDOW->m_sGroupData.pNextWindow)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const auto PHEAD = PWINDOW->getGroupHead();
|
const auto PHEAD = PWINDOW->getGroupHead();
|
||||||
|
|
||||||
if (args == "lock") {
|
if (args == "lock")
|
||||||
PHEAD->m_sGroupData.locked = true;
|
PHEAD->m_sGroupData.locked = true;
|
||||||
} else if (args == "toggle") {
|
else if (args == "toggle")
|
||||||
PHEAD->m_sGroupData.locked = !PHEAD->m_sGroupData.locked;
|
PHEAD->m_sGroupData.locked = !PHEAD->m_sGroupData.locked;
|
||||||
} else {
|
else
|
||||||
PHEAD->m_sGroupData.locked = false;
|
PHEAD->m_sGroupData.locked = false;
|
||||||
}
|
|
||||||
|
|
||||||
g_pCompositor->updateWindowAnimatedDecorationValues(PWINDOW);
|
g_pCompositor->updateWindowAnimatedDecorationValues(PWINDOW);
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,9 +42,8 @@ bool CLayoutManager::removeLayout(IHyprLayout* layout) {
|
||||||
if (IT == m_vLayouts.end() || IT->first == "dwindle" || IT->first == "master")
|
if (IT == m_vLayouts.end() || IT->first == "dwindle" || IT->first == "master")
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (m_iCurrentLayoutID == IT - m_vLayouts.begin()) {
|
if (m_iCurrentLayoutID == IT - m_vLayouts.begin())
|
||||||
switchToLayout("dwindle");
|
switchToLayout("dwindle");
|
||||||
}
|
|
||||||
|
|
||||||
Debug::log(LOG, "Removed a layout %s at %lx", IT->first.c_str(), layout);
|
Debug::log(LOG, "Removed a layout %s at %lx", IT->first.c_str(), layout);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue