mirror of
https://github.com/hyprwm/aquamarine.git
synced 2024-11-17 07:15:59 +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() {
|
bool Aquamarine::CHeadlessOutput::destroy() {
|
||||||
|
events.destroy.emit();
|
||||||
std::erase(backend->outputs, self.lock());
|
std::erase(backend->outputs, self.lock());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -496,6 +496,7 @@ Aquamarine::CWaylandOutput::CWaylandOutput(const std::string& name_, Hyprutils::
|
||||||
|
|
||||||
Aquamarine::CWaylandOutput::~CWaylandOutput() {
|
Aquamarine::CWaylandOutput::~CWaylandOutput() {
|
||||||
backend->idleCallbacks.clear(); // FIXME: mega hack to avoid a UAF in frame events
|
backend->idleCallbacks.clear(); // FIXME: mega hack to avoid a UAF in frame events
|
||||||
|
events.destroy.emit();
|
||||||
if (waylandState.xdgToplevel)
|
if (waylandState.xdgToplevel)
|
||||||
waylandState.xdgToplevel->sendDestroy();
|
waylandState.xdgToplevel->sendDestroy();
|
||||||
if (waylandState.xdgSurface)
|
if (waylandState.xdgSurface)
|
||||||
|
|
Loading…
Reference in a new issue