[server,shadow] do treat deactivate/reactivate
if a resolution change is required, run postconnect just as if it was successful.
This commit is contained in:
parent
5680a347d2
commit
c11f47db89
@ -759,22 +759,19 @@ static state_run_t rdp_peer_handle_state_active(freerdp_peer* client)
|
||||
}
|
||||
if (!client->connected)
|
||||
{
|
||||
switch (rdp_get_state(rdp))
|
||||
{
|
||||
case CONNECTION_STATE_CAPABILITIES_EXCHANGE_DEMAND_ACTIVE:
|
||||
ret = STATE_RUN_CONTINUE;
|
||||
break;
|
||||
case CONNECTION_STATE_ACTIVE:
|
||||
default:
|
||||
ret = STATE_RUN_FAILED;
|
||||
break;
|
||||
}
|
||||
ret = STATE_RUN_FAILED;
|
||||
}
|
||||
else if (!client->activated)
|
||||
{
|
||||
IFCALLRET(client->Activate, client->activated, client);
|
||||
BOOL activated = TRUE;
|
||||
|
||||
if (!client->activated)
|
||||
/* Set client->activated TRUE before calling the Activate callback.
|
||||
* the Activate callback might reset the client->activated flag even if it returns success
|
||||
* (e.g. deactivate/reactivate sequence) */
|
||||
client->activated = TRUE;
|
||||
IFCALLRET(client->Activate, activated, client);
|
||||
|
||||
if (!activated)
|
||||
ret = STATE_RUN_FAILED;
|
||||
else
|
||||
ret = STATE_RUN_SUCCESS;
|
||||
|
@ -481,15 +481,6 @@ static BOOL shadow_client_post_connect(freerdp_peer* peer)
|
||||
peer->hostname, settings->DesktopWidth, settings->DesktopHeight,
|
||||
freerdp_settings_get_uint32(settings, FreeRDP_ColorDepth));
|
||||
|
||||
/* Resize client if necessary */
|
||||
if (shadow_client_recalc_desktop_size(client))
|
||||
{
|
||||
shadow_send_desktop_resize(client);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
shadow_reset_desktop_resize(client);
|
||||
|
||||
if (shadow_client_channels_post_connect(client) != CHANNEL_RC_OK)
|
||||
return FALSE;
|
||||
|
||||
@ -644,6 +635,11 @@ static BOOL shadow_client_activate(freerdp_peer* peer)
|
||||
settings = peer->context->settings;
|
||||
WINPR_ASSERT(settings);
|
||||
|
||||
/* Resize client if necessary */
|
||||
if (shadow_client_recalc_desktop_size(client))
|
||||
return shadow_send_desktop_resize(client);
|
||||
|
||||
shadow_reset_desktop_resize(client);
|
||||
client->activated = TRUE;
|
||||
client->inLobby = client->mayView ? FALSE : TRUE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user