diff --git a/client/src/app.c b/client/src/app.c index 1b45c569..e0eadb11 100644 --- a/client/src/app.c +++ b/client/src/app.c @@ -1011,20 +1011,23 @@ bool app_guestIsOther(void) void app_useSpiceDisplay(bool enable) { - if (!g_params.useSpice) + static bool enabled = false; + + if (!g_params.useSpice || enabled == enable) return; if (!purespice_hasChannel(PS_CHANNEL_DISPLAY)) return; + enabled = enable; if (enable) { purespice_connectChannel(PS_CHANNEL_DISPLAY); - // do not call spiceShow as the surface create callback will do this + RENDERER(spiceShow, true); } else { - RENDERER(spiceShow, false); purespice_disconnectChannel(PS_CHANNEL_DISPLAY); + RENDERER(spiceShow, false); } } diff --git a/client/src/main.c b/client/src/main.c index 41482d28..1e9c3398 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -885,8 +885,6 @@ static void spice_surfaceCreate(unsigned int surfaceId, PSSurfaceFormat format, core_updatePositionInfo(); renderQueue_spiceConfigure(width, height); - if (g_state.lgr) - RENDERER(spiceShow, true); } static void spice_surfaceDestroy(unsigned int surfaceId)