diff --git a/include/aquamarine/output/Output.hpp b/include/aquamarine/output/Output.hpp index 1288a1f..41e4da3 100644 --- a/include/aquamarine/output/Output.hpp +++ b/include/aquamarine/output/Output.hpp @@ -53,6 +53,7 @@ namespace Aquamarine { AQ_OUTPUT_STATE_EXPLICIT_IN_FENCE = (1 << 8), AQ_OUTPUT_STATE_EXPLICIT_OUT_FENCE = (1 << 9), AQ_OUTPUT_STATE_CTM = (1 << 10), + AQ_OUTPUT_STATE_CURSOR = (1 << 11), }; struct SInternalState { diff --git a/src/backend/drm/DRM.cpp b/src/backend/drm/DRM.cpp index f69a444..303e07e 100644 --- a/src/backend/drm/DRM.cpp +++ b/src/backend/drm/DRM.cpp @@ -1657,6 +1657,7 @@ bool Aquamarine::CDRMOutput::setCursor(SP buffer, const Vector2D& hotsp if (!connector->crtc) return false; + state->internalState.committed |= COutputState::AQ_OUTPUT_STATE_CURSOR; if (!buffer) setCursorVisible(false); else { @@ -1731,6 +1732,9 @@ bool Aquamarine::CDRMOutput::setCursor(SP buffer, const Vector2D& hotsp void Aquamarine::CDRMOutput::moveCursor(const Vector2D& coord, bool skipSchedule) { cursorPos = coord; // cursorVisible = true; + if (!skipSchedule) + state->internalState.committed |= COutputState::AQ_OUTPUT_STATE_CURSOR; + backend->impl->moveCursor(connector, skipSchedule); } diff --git a/src/backend/drm/impl/Atomic.cpp b/src/backend/drm/impl/Atomic.cpp index b031076..d766014 100644 --- a/src/backend/drm/impl/Atomic.cpp +++ b/src/backend/drm/impl/Atomic.cpp @@ -123,7 +123,7 @@ void Aquamarine::CDRMAtomicRequest::addConnector(Hyprutils::Memory::CSharedPoint if (connector->crtc->primary->props.fb_damage_clips) add(connector->crtc->primary->id, connector->crtc->primary->props.fb_damage_clips, data.atomic.fbDamage); - if (connector->crtc->cursor) { + if (connector->crtc->cursor && STATE.committed & COutputState::AQ_OUTPUT_STATE_CURSOR) { if (!connector->output->cursorVisible) planeProps(connector->crtc->cursor, nullptr, 0, {}); else