Add an activated event and a Timer event
Added an event that is triggered when the activation sequence is finished. We also define a timer event that is neat to have for regular operation.
This commit is contained in:
parent
71fd6f3116
commit
2a6c9e1b87
@ -66,6 +66,10 @@ DEFINE_EVENT_BEGIN(ErrorInfo)
|
||||
UINT32 code;
|
||||
DEFINE_EVENT_END(ErrorInfo)
|
||||
|
||||
DEFINE_EVENT_BEGIN(Activated)
|
||||
BOOL firstActivation;
|
||||
DEFINE_EVENT_END(Activated)
|
||||
|
||||
DEFINE_EVENT_BEGIN(Terminate)
|
||||
int code;
|
||||
DEFINE_EVENT_END(Terminate)
|
||||
@ -100,6 +104,10 @@ UINT16 x;
|
||||
UINT16 y;
|
||||
DEFINE_EVENT_END(MouseEvent)
|
||||
|
||||
DEFINE_EVENT_BEGIN(Timer)
|
||||
UINT64 now;
|
||||
DEFINE_EVENT_END(Timer)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -600,6 +600,8 @@ static wEventType FreeRDP_Events[] =
|
||||
DEFINE_EVENT_ENTRY(ChannelConnected)
|
||||
DEFINE_EVENT_ENTRY(ChannelDisconnected)
|
||||
DEFINE_EVENT_ENTRY(MouseEvent)
|
||||
DEFINE_EVENT_ENTRY(Activated)
|
||||
DEFINE_EVENT_ENTRY(Timer)
|
||||
};
|
||||
|
||||
/** Allocator function for a rdp context.
|
||||
|
@ -1438,7 +1438,15 @@ int rdp_recv_callback(rdpTransport* transport, wStream* s, void* extra)
|
||||
|
||||
if ((status >= 0) && (rdp->finalize_sc_pdus == FINALIZE_SC_COMPLETE))
|
||||
{
|
||||
ActivatedEventArgs activatedEvent;
|
||||
rdpContext *context = rdp->context;
|
||||
|
||||
rdp_client_transition_to_state(rdp, CONNECTION_STATE_ACTIVE);
|
||||
|
||||
EventArgsInit(&activatedEvent, "xfreerdp");
|
||||
activatedEvent.firstActivation = !rdp->deactivation_reactivation;
|
||||
PubSub_OnActivated(context->pubSub, context, &activatedEvent);
|
||||
|
||||
return 2;
|
||||
}
|
||||
if (status < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user