Added autoreconnect for wayland.
This commit is contained in:
parent
f0e9c95f44
commit
2a06366de3
@ -242,6 +242,7 @@ static BOOL wl_post_connect(freerdp* instance)
|
||||
|
||||
w = (UINT32)gdi->width;
|
||||
h = (UINT32)gdi->height;
|
||||
|
||||
if (settings->SmartSizing && !context->fullscreen)
|
||||
{
|
||||
if (settings->SmartSizingWidth > 0)
|
||||
@ -390,6 +391,22 @@ static BOOL handle_uwac_events(freerdp* instance, UwacDisplay* display)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static BOOL handle_window_events(freerdp* instance)
|
||||
{
|
||||
rdpSettings* settings;
|
||||
|
||||
if (!instance || !instance->settings)
|
||||
return FALSE;
|
||||
|
||||
settings = instance->settings;
|
||||
|
||||
if (!settings->AsyncInput)
|
||||
{
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int wlfreerdp_run(freerdp* instance)
|
||||
{
|
||||
wlfContext* context;
|
||||
@ -438,6 +455,18 @@ static int wlfreerdp_run(freerdp* instance)
|
||||
|
||||
if (freerdp_check_event_handles(instance->context) != TRUE)
|
||||
{
|
||||
if (client_auto_reconnect_ex(instance, handle_window_events))
|
||||
continue;
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Indicate an unsuccessful connection attempt if reconnect
|
||||
* did not succeed and no other error was specified.
|
||||
*/
|
||||
if (freerdp_error_info(instance) == 0)
|
||||
status = 42;
|
||||
}
|
||||
|
||||
if (freerdp_get_last_error(instance->context) == FREERDP_ERROR_SUCCESS)
|
||||
WLog_Print(context->log, WLOG_ERROR, "Failed to check FreeRDP file descriptor");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user