Tweak close window

This commit is contained in:
vaxerski 2021-11-25 16:51:09 +01:00
parent bf8c2f9bc7
commit 3be88ec4dd
2 changed files with 7 additions and 5 deletions

View file

@ -56,3 +56,4 @@
#define HYPRATOM(name) {name, 0} #define HYPRATOM(name) {name, 0}

View file

@ -217,7 +217,8 @@ bool CWindowManager::handleEvent() {
break; break;
default: default:
//Debug::log(WARN, "Unknown event: " + std::to_string(ev->response_type & ~0x80)); if (ev->response_type & ~0x80 != 14)
Debug::log(WARN, "Unknown event: " + std::to_string(ev->response_type & ~0x80));
break; break;
} }
@ -718,10 +719,10 @@ void CWindowManager::closeWindowAllChecks(int64_t id) {
const auto CLOSEDWINDOW = g_pWindowManager->getWindowFromDrawable(id); const auto CLOSEDWINDOW = g_pWindowManager->getWindowFromDrawable(id);
if (CLOSEDWINDOW && !CLOSEDWINDOW->getIsFloating()) { if (CLOSEDWINDOW && !CLOSEDWINDOW->getIsFloating()) {
g_pWindowManager->fixWindowOnClose(CLOSEDWINDOW); g_pWindowManager->fixWindowOnClose(CLOSEDWINDOW);
}
// delete off of the arr // delete off of the arr
g_pWindowManager->removeWindowFromVectorSafe(id); g_pWindowManager->removeWindowFromVectorSafe(id);
}
} }
void CWindowManager::fixWindowOnClose(CWindow* pClosedWindow) { void CWindowManager::fixWindowOnClose(CWindow* pClosedWindow) {