mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-12-25 02:39:49 +01:00
Added a hypothetical sanity check #2
This commit is contained in:
parent
aec53d2420
commit
2645bbdc05
1 changed files with 23 additions and 0 deletions
|
@ -453,6 +453,29 @@ void CWindowManager::sanityCheckOnWorkspace(int workspaceID) {
|
|||
Debug::log(LOG, "Sanity check A finished successfully.");
|
||||
}
|
||||
}
|
||||
|
||||
// Hypothetical check #2: Check if children are present and tiled. (for nodes)
|
||||
// I have not found this occurring but I have had some issues with... stuff.
|
||||
if (w.getDrawable() < 0) {
|
||||
const auto CHILDA = getWindowFromDrawable(w.getChildNodeAID());
|
||||
const auto CHILDB = getWindowFromDrawable(w.getChildNodeBID());
|
||||
|
||||
if (CHILDA && CHILDB) {
|
||||
|
||||
if (CHILDA->getIsFloating()) {
|
||||
g_pWindowManager->fixWindowOnClose(CHILDA);
|
||||
g_pWindowManager->calculateNewWindowParams(CHILDA);
|
||||
}
|
||||
|
||||
if (CHILDB->getIsFloating()) {
|
||||
g_pWindowManager->fixWindowOnClose(CHILDB);
|
||||
g_pWindowManager->calculateNewWindowParams(CHILDB);
|
||||
}
|
||||
|
||||
} else {
|
||||
Debug::log(ERR, "Malformed node ID " + std::to_string(w.getDrawable()) + " with 2 children but one or both are nullptr.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue