wayland: handle close events

This commit is contained in:
Vaxry 2024-07-01 13:06:35 +02:00
parent aadc5dd5e6
commit b8fc53e69d

View file

@ -469,6 +469,13 @@ Aquamarine::CWaylandOutput::CWaylandOutput(const std::string& name_, Hyprutils::
sendFrameAndSetCallback();
});
waylandState.xdgToplevel->setClose([this](CCXdgToplevel* r) {
events.destroy.emit();
waylandState.surface->sendAttach(nullptr, 0, 0);
waylandState.surface->sendCommit();
std::erase(backend->outputs, self.lock());
});
auto inputRegion = makeShared<CCWlRegion>(backend->waylandState.compositor->sendCreateRegion());
inputRegion->sendAdd(0, 0, INT32_MAX, INT32_MAX);