diff --git a/include/aquamarine/output/Output.hpp b/include/aquamarine/output/Output.hpp index d6d6723..957ff41 100644 --- a/include/aquamarine/output/Output.hpp +++ b/include/aquamarine/output/Output.hpp @@ -82,6 +82,7 @@ namespace Aquamarine { void setBuffer(Hyprutils::Memory::CSharedPointer buffer); void setExplicitInFence(int64_t fenceFD); // -1 removes void setExplicitOutFence(int64_t fenceFD); // -1 removes + void resetExplicitFences(); private: SInternalState internalState; diff --git a/src/output/Output.cpp b/src/output/Output.cpp index 3cdc849..20e39ce 100644 --- a/src/output/Output.cpp +++ b/src/output/Output.cpp @@ -105,11 +105,13 @@ void Aquamarine::COutputState::setExplicitOutFence(int64_t fenceFD) { internalState.committed |= AQ_OUTPUT_STATE_EXPLICIT_OUT_FENCE; } -void Aquamarine::COutputState::onCommit() { - internalState.committed = 0; - internalState.damage.clear(); - +void Aquamarine::COutputState::resetExplicitFences() { // fences are now used, let's reset them to not confuse ourselves later. internalState.explicitInFence = -1; internalState.explicitOutFence = -1; } + +void Aquamarine::COutputState::onCommit() { + internalState.committed = 0; + internalState.damage.clear(); +}