mirror of
https://github.com/hyprwm/aquamarine.git
synced 2024-12-22 11:39:49 +01:00
output: fix destroying wl and headless outputs (#32)
This commit is contained in:
parent
a7d77c60ee
commit
0ab8ffa67d
2 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue