no unmap saving in config

This commit is contained in:
vaxerski 2022-01-06 16:38:41 +01:00
parent be9fecd545
commit 595b186477
4 changed files with 8 additions and 1 deletions

View File

@ -12,7 +12,7 @@ layout=0 # 0 - dwindle (default), 1 - master
focus_when_hover=1 # 0 - do not switch the focus when hover (only for tiling) focus_when_hover=1 # 0 - do not switch the focus when hover (only for tiling)
main_mod=SUPER # For moving, resizing main_mod=SUPER # For moving, resizing
intelligent_transients=1 # keeps transients always on top. intelligent_transients=1 # keeps transients always on top.
no_unmap_saving=1 # disables saving unmapped windows (seems to break sometimes)
# Execs # Execs
# exec-once=/home/me/MyEpicShellScript # will exec the script only when the WM launches # exec-once=/home/me/MyEpicShellScript # will exec the script only when the WM launches

View File

@ -16,6 +16,7 @@ void ConfigManager::init() {
configValues["rounding"].intValue = 5; configValues["rounding"].intValue = 5;
configValues["main_mod"].strValue = "SUPER"; configValues["main_mod"].strValue = "SUPER";
configValues["intelligent_transients"].intValue = 1; configValues["intelligent_transients"].intValue = 1;
configValues["no_unmap_saving"].intValue = 1;
configValues["focus_when_hover"].intValue = 1; configValues["focus_when_hover"].intValue = 1;

View File

@ -631,6 +631,7 @@ void Events::eventMapWindow(xcb_generic_event_t* event) {
} }
if (!pNewWindow || pNewWindow->getClassName() == "") { if (!pNewWindow || pNewWindow->getClassName() == "") {
Debug::log(LOG, "Removing, NULL.");
g_pWindowManager->removeWindowFromVectorSafe(E->window); g_pWindowManager->removeWindowFromVectorSafe(E->window);
return; return;
} }

View File

@ -2070,6 +2070,11 @@ void CWindowManager::recalcAllWorkspaces() {
} }
void CWindowManager::moveWindowToUnmapped(int64_t id) { void CWindowManager::moveWindowToUnmapped(int64_t id) {
if (ConfigManager::getInt("no_unmap_saving") == 1){
closeWindowAllChecks(id);
return;
}
for (auto& w : windows) { for (auto& w : windows) {
if (w.getDrawable() == id) { if (w.getDrawable() == id) {
// Move it // Move it