[host/client] kvmfr: request activation based on guest state

This commit is contained in:
Tudor Brindus 2022-02-06 22:19:27 -05:00 committed by Geoffrey McRae
parent 30c57f411d
commit fd28d0604e
3 changed files with 5 additions and 0 deletions

View file

@ -758,6 +758,9 @@ int main_frameThread(void * unused)
break;
}
if (frame->requestActivation)
g_state.ds->requestActivation();
if (g_params.autoScreensaver && g_state.autoIdleInhibitState != frame->blockScreensaver)
{
if (frame->blockScreensaver)

View file

@ -139,6 +139,7 @@ typedef struct KVMFRFrame
uint32_t damageRectsCount; // the number of damage rectangles (zero for full-frame damage)
FrameDamageRect damageRects[KVMFR_MAX_DAMAGE_RECTS];
bool blockScreensaver; // whether the guest has requested to block screensavers
bool requestActivation; // whether the guest has requested activation since the last frame
}
KVMFRFrame;

View file

@ -276,6 +276,7 @@ static bool sendFrame(void)
fi->pitch = frame.pitch;
fi->offset = app.pageSize - FrameBufferStructSize;
fi->blockScreensaver = os_blockScreensaver();
fi->requestActivation = true; // TODO
app.frameValid = true;
fi->damageRectsCount = frame.damageRectsCount;