diff --git a/QMP/qmp-events.txt b/QMP/qmp-events.txt index 1e87eb16c6ecace8dfa16a52b91f79bb191836a4..dc48cccea17444eb8ae1b083d2e2e1f8decd8761 100644 --- a/QMP/qmp-events.txt +++ b/QMP/qmp-events.txt @@ -37,3 +37,9 @@ except that authentication ID is not provided. Description: Issued when the conection is closed. Data: 'server' and 'client' keys with the same keys as 'query-vnc'. + +6 VNC_INITIALIZED +----------------- + +Description: Issued when the VNC session is made active. +Data: 'server' and 'client' keys with the same keys as 'query-vnc'. diff --git a/monitor.c b/monitor.c index 2540d9467df590907a11ffcc1feb5f080e6261af..fea73834d0da9510e42e452cbbc371ced8facda1 100644 --- a/monitor.c +++ b/monitor.c @@ -360,6 +360,9 @@ void monitor_protocol_event(MonitorEvent event, QObject *data) case QEVENT_VNC_CONNECTED: event_name = "VNC_CONNECTED"; break; + case QEVENT_VNC_INITIALIZED: + event_name = "VNC_INITIALIZED"; + break; case QEVENT_VNC_DISCONNECTED: event_name = "VNC_DISCONNECTED"; break; diff --git a/monitor.h b/monitor.h index 42386de222ce6b9554e260d3b9c601cdd3fc82fe..2da30e880429ced0a9aedd100e4b1a8e4dbff630 100644 --- a/monitor.h +++ b/monitor.h @@ -21,6 +21,7 @@ typedef enum MonitorEvent { QEVENT_POWERDOWN, QEVENT_STOP, QEVENT_VNC_CONNECTED, + QEVENT_VNC_INITIALIZED, QEVENT_VNC_DISCONNECTED, QEVENT_MAX, } MonitorEvent; diff --git a/vnc.c b/vnc.c index a590bb9c81eb428606e1a84d459969b64b9199a5..c7d6652e1556d5c99ea0e7a5da7512f9f66f898c 100644 --- a/vnc.c +++ b/vnc.c @@ -2112,6 +2112,7 @@ static int protocol_client_init(VncState *vs, uint8_t *data, size_t len) vnc_flush(vs); vnc_client_cache_auth(vs); + vnc_qmp_event(vs, QEVENT_VNC_INITIALIZED); vnc_read_when(vs, protocol_client_msg, 1);