mirror of
https://github.com/hyprwm/aquamarine.git
synced 2024-11-17 03:46:00 +01:00
do not set cursor planeProps unless smth changed
This commit is contained in:
parent
545f506a63
commit
8ed37dc475
3 changed files with 6 additions and 1 deletions
|
@ -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 {
|
||||
|
|
|
@ -1657,6 +1657,7 @@ bool Aquamarine::CDRMOutput::setCursor(SP<IBuffer> 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<IBuffer> 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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue