mirror of
https://github.com/hyprwm/aquamarine.git
synced 2024-11-17 08:26: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_IN_FENCE = (1 << 8),
|
||||||
AQ_OUTPUT_STATE_EXPLICIT_OUT_FENCE = (1 << 9),
|
AQ_OUTPUT_STATE_EXPLICIT_OUT_FENCE = (1 << 9),
|
||||||
AQ_OUTPUT_STATE_CTM = (1 << 10),
|
AQ_OUTPUT_STATE_CTM = (1 << 10),
|
||||||
|
AQ_OUTPUT_STATE_CURSOR = (1 << 11),
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SInternalState {
|
struct SInternalState {
|
||||||
|
|
|
@ -1657,6 +1657,7 @@ bool Aquamarine::CDRMOutput::setCursor(SP<IBuffer> buffer, const Vector2D& hotsp
|
||||||
if (!connector->crtc)
|
if (!connector->crtc)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
state->internalState.committed |= COutputState::AQ_OUTPUT_STATE_CURSOR;
|
||||||
if (!buffer)
|
if (!buffer)
|
||||||
setCursorVisible(false);
|
setCursorVisible(false);
|
||||||
else {
|
else {
|
||||||
|
@ -1731,6 +1732,9 @@ bool Aquamarine::CDRMOutput::setCursor(SP<IBuffer> buffer, const Vector2D& hotsp
|
||||||
void Aquamarine::CDRMOutput::moveCursor(const Vector2D& coord, bool skipSchedule) {
|
void Aquamarine::CDRMOutput::moveCursor(const Vector2D& coord, bool skipSchedule) {
|
||||||
cursorPos = coord;
|
cursorPos = coord;
|
||||||
// cursorVisible = true;
|
// cursorVisible = true;
|
||||||
|
if (!skipSchedule)
|
||||||
|
state->internalState.committed |= COutputState::AQ_OUTPUT_STATE_CURSOR;
|
||||||
|
|
||||||
backend->impl->moveCursor(connector, skipSchedule);
|
backend->impl->moveCursor(connector, skipSchedule);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -123,7 +123,7 @@ void Aquamarine::CDRMAtomicRequest::addConnector(Hyprutils::Memory::CSharedPoint
|
||||||
if (connector->crtc->primary->props.fb_damage_clips)
|
if (connector->crtc->primary->props.fb_damage_clips)
|
||||||
add(connector->crtc->primary->id, connector->crtc->primary->props.fb_damage_clips, data.atomic.fbDamage);
|
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)
|
if (!connector->output->cursorVisible)
|
||||||
planeProps(connector->crtc->cursor, nullptr, 0, {});
|
planeProps(connector->crtc->cursor, nullptr, 0, {});
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue