[client] spice: delay showing the spice display until spice is ready

This commit is contained in:
Geoffrey McRae
2022-05-24 09:48:54 +10:00
parent c0da28247d
commit d1e421f8a8
6 changed files with 75 additions and 39 deletions

View File

@@ -845,6 +845,10 @@ static void checkUUID(void)
void spiceReady(void)
{
g_state.spiceReady = true;
if (g_state.initialSpiceDisplay)
app_useSpiceDisplay(true);
// set the intial mouse mode
purespice_mouseMode(true);
@@ -864,7 +868,6 @@ void spiceReady(void)
return;
memcpy(g_state.spiceUUID, info.uuid, sizeof(g_state.spiceUUID));
g_state.spiceReady = true;
checkUUID();
if (g_params.useSpiceInput)
@@ -962,6 +965,11 @@ int spiceThread(void * arg)
#endif
};
/* use the spice display until we get frames from the LG host application
* it is safe to call this before connect as it will be delayed until
* spiceReady is called */
app_useSpiceDisplay(true);
if (!purespice_connect(&config))
{
DEBUG_ERROR("Failed to connect to spice server");
@@ -1317,9 +1325,6 @@ static int lg_run(void)
if (g_state.cbAvailable)
g_state.cbRequestList = ll_new();
// use the spice display until we get frames from the LG host application
app_useSpiceDisplay(true);
LGMP_STATUS status;
while(g_state.state == APP_STATE_RUNNING)