Skip to content
Snippets Groups Projects
Commit 1b4fd516 authored by Guoyi Tu's avatar Guoyi Tu Committed by Marc-André Lureau
Browse files

ui/vdagent: call vdagent_disconnect() when agent connection is lost


when the agent connection is lost, the input handler of the mouse
doesn't deactivate, which results in unresponsive mouse events in
VNC windows.

To fix this issue, call vdagent_disconnect() to reset the state
each time the frontend disconncect

Signed-off-by: default avatarGuoyi Tu <tugy@chinatelecom.cn>
Signed-off-by: default avatardengpengcheng <dengpc12@chinatelecom.cn>
Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <71fd5a58fd09f10cdb35f167b2edb5669300116e.1692281173.git.tugy@chinatelecom.cn>
parent 7007e98c
No related branches found
No related tags found
No related merge requests found
......@@ -870,8 +870,11 @@ static void vdagent_disconnect(VDAgentChardev *vd)
static void vdagent_chr_set_fe_open(struct Chardev *chr, int fe_open)
{
VDAgentChardev *vd = QEMU_VDAGENT_CHARDEV(chr);
if (!fe_open) {
trace_vdagent_close();
vdagent_disconnect(vd);
/* To reset_serial, we CLOSED our side. Make sure the other end knows we
* are ready again. */
qemu_chr_be_event(chr, CHR_EVENT_OPENED);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment