diff --git a/example/hypr.conf b/example/hypr.conf index 86db3f8..07c809e 100644 --- a/example/hypr.conf +++ b/example/hypr.conf @@ -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) main_mod=SUPER # For moving, resizing intelligent_transients=1 # keeps transients always on top. - +no_unmap_saving=1 # disables saving unmapped windows (seems to break sometimes) # Execs # exec-once=/home/me/MyEpicShellScript # will exec the script only when the WM launches diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 24992a6..43700b4 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -16,6 +16,7 @@ void ConfigManager::init() { configValues["rounding"].intValue = 5; configValues["main_mod"].strValue = "SUPER"; configValues["intelligent_transients"].intValue = 1; + configValues["no_unmap_saving"].intValue = 1; configValues["focus_when_hover"].intValue = 1; diff --git a/src/events/events.cpp b/src/events/events.cpp index 05d2e0a..46a4cc4 100644 --- a/src/events/events.cpp +++ b/src/events/events.cpp @@ -631,6 +631,7 @@ void Events::eventMapWindow(xcb_generic_event_t* event) { } if (!pNewWindow || pNewWindow->getClassName() == "") { + Debug::log(LOG, "Removing, NULL."); g_pWindowManager->removeWindowFromVectorSafe(E->window); return; } diff --git a/src/windowManager.cpp b/src/windowManager.cpp index df7e5c6..479b0ec 100644 --- a/src/windowManager.cpp +++ b/src/windowManager.cpp @@ -2070,6 +2070,11 @@ void CWindowManager::recalcAllWorkspaces() { } void CWindowManager::moveWindowToUnmapped(int64_t id) { + if (ConfigManager::getInt("no_unmap_saving") == 1){ + closeWindowAllChecks(id); + return; + } + for (auto& w : windows) { if (w.getDrawable() == id) { // Move it