Alongside with the 2 previous commits.
This commit is contained in:
vaxerski 2021-11-30 17:08:52 +01:00
parent e9313fe3aa
commit f32c0abcf2
3 changed files with 10 additions and 2 deletions

View file

@ -77,11 +77,14 @@ void Events::eventLeave(xcb_generic_event_t* event) {
void Events::eventDestroy(xcb_generic_event_t* event) {
const auto E = reinterpret_cast<xcb_destroy_notify_event_t*>(event);
xcb_kill_client(g_pWindowManager->DisplayConnection, E->window);
g_pWindowManager->closeWindowAllChecks(E->window);
}
// Can someone tell me why the fuck some dialogs do not report they are closed and still respond to XCB even after they disappear???
void Events::eventUnmapWindow(xcb_generic_event_t* event) {
const auto E = reinterpret_cast<xcb_unmap_notify_event_t*>(event);
g_pWindowManager->closeWindowAllChecks(E->window);
}
CWindow* Events::remapFloatingWindow(int windowID, int forcemonitor) {

View file

@ -9,6 +9,7 @@ namespace Events {
EVENT(Leave);
EVENT(Destroy);
EVENT(MapWindow);
EVENT(UnmapWindow);
EVENT(ButtonPress);
EVENT(ButtonRelease);
EVENT(Expose);

View file

@ -223,6 +223,10 @@ bool CWindowManager::handleEvent() {
Events::eventDestroy(ev);
Debug::log(LOG, "Event dispatched DESTROY");
break;
case XCB_UNMAP_NOTIFY:
Events::eventUnmapWindow(ev);
Debug::log(LOG, "Event dispatched UNMAP");
break;
case XCB_MAP_REQUEST:
Events::eventMapWindow(ev);
Debug::log(LOG, "Event dispatched MAP");