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) { void Events::eventDestroy(xcb_generic_event_t* event) {
const auto E = reinterpret_cast<xcb_destroy_notify_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); 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) { CWindow* Events::remapFloatingWindow(int windowID, int forcemonitor) {

View File

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

View File

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