Skip to content

Commit

Permalink
output: fix destroying wl and headless outputs (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
ikalco authored Jul 25, 2024
1 parent a7d77c6 commit 0ab8ffa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/backend/Headless.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ void Aquamarine::CHeadlessOutput::scheduleFrame(const scheduleFrameReason reason
}

bool Aquamarine::CHeadlessOutput::destroy() {
events.destroy.emit();
std::erase(backend->outputs, self.lock());
return true;
}
Expand Down
1 change: 1 addition & 0 deletions src/backend/Wayland.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ Aquamarine::CWaylandOutput::CWaylandOutput(const std::string& name_, Hyprutils::

Aquamarine::CWaylandOutput::~CWaylandOutput() {
backend->idleCallbacks.clear(); // FIXME: mega hack to avoid a UAF in frame events
events.destroy.emit();
if (waylandState.xdgToplevel)
waylandState.xdgToplevel->sendDestroy();
if (waylandState.xdgSurface)
Expand Down

0 comments on commit 0ab8ffa

Please sign in to comment.