diff --git a/src/protocols/XDGBell.cpp b/src/protocols/XDGBell.cpp index 593d78fc5..f2cedf660 100644 --- a/src/protocols/XDGBell.cpp +++ b/src/protocols/XDGBell.cpp @@ -1,5 +1,5 @@ #include "XDGBell.hpp" -#include "XDGShell.hpp" +#include "core/Compositor.hpp" #include "../desktop/Window.hpp" #include "../managers/EventManager.hpp" #include "../Compositor.hpp" @@ -11,8 +11,8 @@ CXDGSystemBellManagerResource::CXDGSystemBellManagerResource(UPsetDestroy([this](CXdgSystemBellV1* r) { PROTO::xdgBell->destroyResource(this); }); m_resource->setOnDestroy([this](CXdgSystemBellV1* r) { PROTO::xdgBell->destroyResource(this); }); - m_resource->setRing([](CXdgSystemBellV1* r, wl_resource* toplevel) { - if (!toplevel) { + m_resource->setRing([](CXdgSystemBellV1* r, wl_resource* surface) { + if (!surface) { g_pEventManager->postEvent(SHyprIPCEvent{ .event = "bell", .data = "", @@ -20,9 +20,9 @@ CXDGSystemBellManagerResource::CXDGSystemBellManagerResource(UPpostEvent(SHyprIPCEvent{ .event = "bell", .data = "", @@ -31,10 +31,10 @@ CXDGSystemBellManagerResource::CXDGSystemBellManagerResource(UPm_windows) { - if (!w->m_isMapped || w->m_isX11 || !w->m_xdgSurface) + if (!w->m_isMapped || w->m_isX11 || !w->m_xdgSurface || !w->m_wlSurface) continue; - if (w->m_xdgSurface == TOPLEVEL->owner) { + if (w->m_wlSurface->resource() == SURFACE) { g_pEventManager->postEvent(SHyprIPCEvent{ .event = "bell", .data = std::format("{:x}", (uintptr_t)w.get()),