mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-07-25 17:21:54 -07:00
compositor: fix race to finish on null buffer (#10970)
if a null buffer is commited and a pending state is awaiting, drop the pending state so we dont end up in race to finish brokeness.
This commit is contained in:
@@ -128,6 +128,13 @@ CWLSurfaceResource::CWLSurfaceResource(SP<CWlSurface> resource_) : m_resource(re
|
||||
(!m_pending.buffer && !m_pending.texture) // null buffer attached
|
||||
) {
|
||||
commitState(m_pending);
|
||||
|
||||
if (!m_pending.buffer && !m_pending.texture) {
|
||||
// null buffer attached, remove any pending states.
|
||||
while (!m_pendingStates.empty()) {
|
||||
m_pendingStates.pop();
|
||||
}
|
||||
}
|
||||
m_pending.reset();
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user