fix possible segfault by realloc
This commit is contained in:
parent
3970b43ea2
commit
91d68513de
4 changed files with 27 additions and 8 deletions
|
|
@ -894,10 +894,18 @@ void CKeybindManager::toggleSpecialWorkspace(std::string args) {
|
|||
}
|
||||
|
||||
void CKeybindManager::forceRendererReload(std::string args) {
|
||||
bool overAgain = false;
|
||||
|
||||
for (auto& m : g_pCompositor->m_vMonitors) {
|
||||
auto rule = g_pConfigManager->getMonitorRuleFor(m->szName);
|
||||
g_pHyprRenderer->applyMonitorRule(m.get(), &rule, true);
|
||||
if (!g_pHyprRenderer->applyMonitorRule(m.get(), &rule, true)) {
|
||||
overAgain = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (overAgain)
|
||||
forceRendererReload(args);
|
||||
}
|
||||
|
||||
void CKeybindManager::resizeActive(std::string args) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue