From 6d9f8ea22c0cdc5711d97d7212c4b7f49f2915ff Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sat, 1 Jan 2022 17:09:39 +0100 Subject: [PATCH] dont manage errors at all --- src/events/events.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/events/events.cpp b/src/events/events.cpp index 9008137..cb96fd5 100644 --- a/src/events/events.cpp +++ b/src/events/events.cpp @@ -148,7 +148,12 @@ CWindow* Events::remapFloatingWindow(int windowID, int forcemonitor) { const auto PWINDOWINARR = g_pWindowManager->getWindowFromDrawable(windowID); if (!PWINDOWINARR) { - Debug::log(ERR, "remapWindow called with an invalid window!"); + Debug::log(ERR, "remapFloatingWindow called with an invalid window!"); + return nullptr; + } + + if (PWINDOWINARR->getClassName() == "") { + Debug::log(WARN, "remapFloatingWindow with Error, not managing."); return nullptr; } @@ -394,8 +399,8 @@ CWindow* Events::remapWindow(int windowID, bool wasfloating, int forcemonitor) { } if (PWINDOWINARR->getClassName() == "Error") { - Debug::log(LOG, "Class error -> force float"); - return remapFloatingWindow(windowID, forcemonitor); + Debug::log(LOG, "Class error -> we wont manage this."); + return nullptr; } @@ -600,8 +605,10 @@ void Events::eventMapWindow(xcb_generic_event_t* event) { pNewWindow = remapWindow(E->window); } - if (!pNewWindow) + if (!pNewWindow) { + g_pWindowManager->removeWindowFromVectorSafe(E->window); return; + } // Do post-creation checks. g_pWindowManager->doPostCreationChecks(pNewWindow);