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

@ -55,4 +55,5 @@
#define HYPRATOM(name) {name, 0}
#define HYPRATOM(name) {name, 0}

View file

@ -217,7 +217,8 @@ bool CWindowManager::handleEvent() {
break;
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;
}
@ -718,10 +719,10 @@ void CWindowManager::closeWindowAllChecks(int64_t id) {
const auto CLOSEDWINDOW = g_pWindowManager->getWindowFromDrawable(id);
if (CLOSEDWINDOW && !CLOSEDWINDOW->getIsFloating()) {
g_pWindowManager->fixWindowOnClose(CLOSEDWINDOW);
// delete off of the arr
g_pWindowManager->removeWindowFromVectorSafe(id);
}
// delete off of the arr
g_pWindowManager->removeWindowFromVectorSafe(id);
}
void CWindowManager::fixWindowOnClose(CWindow* pClosedWindow) {