summaryrefslogtreecommitdiff
path: root/src/protocols/XDGBell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocols/XDGBell.cpp')
-rw-r--r--src/protocols/XDGBell.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/protocols/XDGBell.cpp b/src/protocols/XDGBell.cpp
index 61f070ff..593d78fc 100644
--- a/src/protocols/XDGBell.cpp
+++ b/src/protocols/XDGBell.cpp
@@ -12,6 +12,14 @@ CXDGSystemBellManagerResource::CXDGSystemBellManagerResource(UP<CXdgSystemBellV1
m_resource->setOnDestroy([this](CXdgSystemBellV1* r) { PROTO::xdgBell->destroyResource(this); });
m_resource->setRing([](CXdgSystemBellV1* r, wl_resource* toplevel) {
+ if (!toplevel) {
+ g_pEventManager->postEvent(SHyprIPCEvent{
+ .event = "bell",
+ .data = "",
+ });
+ return;
+ }
+
auto TOPLEVEL = CXDGToplevelResource::fromResource(toplevel);
if (!TOPLEVEL) {