Skip to content

Commit

Permalink
wayland: handle close events
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Jul 1, 2024
1 parent aadc5dd commit b8fc53e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/backend/Wayland.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit b8fc53e

Please sign in to comment.