Process close event

This commit is contained in:
0140454 2021-01-30 21:38:03 +08:00 committed by akallabeth
parent 385c0596e1
commit 96ff661008
2 changed files with 12 additions and 0 deletions

View File

@ -412,6 +412,11 @@ static BOOL handle_uwac_events(freerdp* instance, UwacDisplay* display)
break; break;
case UWAC_EVENT_CLOSE:
context->closed = TRUE;
break;
default: default:
break; break;
} }
@ -482,6 +487,12 @@ static int wlfreerdp_run(freerdp* instance)
break; break;
} }
if (context->closed)
{
WLog_Print(context->log, WLOG_INFO, "Closed from Wayland");
break;
}
if (freerdp_check_event_handles(instance->context) != TRUE) if (freerdp_check_event_handles(instance->context) != TRUE)
{ {
if (client_auto_reconnect_ex(instance, handle_window_events)) if (client_auto_reconnect_ex(instance, handle_window_events))

View File

@ -42,6 +42,7 @@ struct wlf_context
UwacSeat* seat; UwacSeat* seat;
BOOL fullscreen; BOOL fullscreen;
BOOL closed;
/* Channels */ /* Channels */
RdpeiClientContext* rdpei; RdpeiClientContext* rdpei;