[idd] transport: arbitrate interaction requests

This commit is contained in:
Geoffrey McRae
2026-08-13 00:20:38 +10:00
parent 5b09d4f90a
commit fbc4640623
10 changed files with 270 additions and 38 deletions

View File

@@ -171,11 +171,11 @@ void CPipeServer::ClearRecoveryHandler(void * opaque)
m_recoveryOpaque = nullptr;
}
void CPipeServer::SetCursorPos(uint32_t x, uint32_t y)
bool CPipeServer::SetCursorPos(int32_t x, int32_t y)
{
// do not send cursor messages if we are not connected or they will end up queued
if (!m_endpoint.IsConnected())
return;
return false;
LGPipeMsg msg = {};
msg.size = sizeof(msg);
@@ -184,7 +184,7 @@ void CPipeServer::SetCursorPos(uint32_t x, uint32_t y)
msg.curorPos.y = y;
// Cursor position is transient. If the connection is lost during this
// write, drop it instead of replaying stale coordinates after reconnect.
m_endpoint.Send(&msg, sizeof(msg));
return m_endpoint.Send(&msg, sizeof(msg));
}
void CPipeServer::SetDisplayMode(

View File

@@ -72,7 +72,7 @@ class CPipeServer : private IPipeEndpointHandler
void SetRecoveryHandler(RecoveryHandler handler, void * opaque);
void ClearRecoveryHandler(void * opaque);
void SetCursorPos(uint32_t x, uint32_t y);
bool SetCursorPos(int32_t x, int32_t y);
void SetDisplayMode(
uint32_t width, uint32_t height, uint32_t refreshMilliHz);
void SetGPUStatus(bool software);