mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-25 22:35:58 +01:00
parent
e9313fe3aa
commit
f32c0abcf2
3 changed files with 10 additions and 2 deletions
|
@ -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) {
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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");
|
||||||
|
|
Loading…
Reference in a new issue