summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHarsh Narayan Jha <harshnj1103@gmail.com>2026-03-05 01:30:00 +0530
committerGitHub <noreply@github.com>2026-03-04 20:00:00 +0000
commit3f169ee5defe4fb3902edcbedb17e9bd058f9b21 (patch)
tree81c4c0d1cebbbcb4af4ca6a509e97c8639df9374 /src
parent10754745a97c99449ef40db58bd425f5a91f9993 (diff)
socket2: emit `kill` event (hyprctl kill) (#13104)
Diffstat (limited to 'src')
-rw-r--r--src/event/EventBus.hpp1
-rw-r--r--src/managers/input/InputManager.cpp3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/event/EventBus.hpp b/src/event/EventBus.hpp
index 8f59acbd..60bd1511 100644
--- a/src/event/EventBus.hpp
+++ b/src/event/EventBus.hpp
@@ -41,6 +41,7 @@ namespace Event {
Event<PHLWINDOW> openEarly;
Event<PHLWINDOW> destroy;
Event<PHLWINDOW> close;
+ Event<PHLWINDOW> kill;
Event<PHLWINDOW, Desktop::eFocusReason> active;
Event<PHLWINDOW> urgent;
Event<PHLWINDOW> title;
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index 64825633..9195536f 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -847,6 +847,9 @@ void CInputManager::processMouseDownKill(const IPointer::SButtonEvent& e) {
break;
}
+ g_pEventManager->postEvent(SHyprIPCEvent({.event = "kill", .data = std::format("{:x}", rc<uintptr_t>(PWINDOW.m_data))}));
+ Event::bus()->m_events.window.kill.emit(PWINDOW);
+
// kill the mf
kill(PWINDOW->getPID(), SIGKILL);
break;