[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 7/8] ui/vdagent: send caps on fe_open
From: |
marcandre . lureau |
Subject: |
[PULL 7/8] ui/vdagent: send caps on fe_open |
Date: |
Tue, 23 Jul 2024 00:06:17 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
The spice-vdagentd doesn't send capabilities again on host/client
disconnect (but when the session agent connects and sends a
GUEST_XORG_RESOLUTION message)
When the dbus client disconnects, vdagent_disconnect() is called to
reset the agent state. Capabilities must be negotiated again on
reconnection.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20240717171541.201525-5-marcandre.lureau@redhat.com>
---
ui/vdagent.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/ui/vdagent.c b/ui/vdagent.c
index 2a4b3574b1..724eff972f 100644
--- a/ui/vdagent.c
+++ b/ui/vdagent.c
@@ -185,7 +185,7 @@ static void vdagent_send_msg(VDAgentChardev *vd,
VDAgentMessage *msg)
vdagent_send_buf(vd);
}
-static void vdagent_send_caps(VDAgentChardev *vd)
+static void vdagent_send_caps(VDAgentChardev *vd, bool request)
{
g_autofree VDAgentMessage *msg = g_malloc0(sizeof(VDAgentMessage) +
sizeof(VDAgentAnnounceCapabilities) +
@@ -205,6 +205,7 @@ static void vdagent_send_caps(VDAgentChardev *vd)
#endif
}
+ caps->request = request;
vdagent_send_msg(vd, msg);
}
@@ -711,7 +712,7 @@ static void vdagent_chr_recv_caps(VDAgentChardev *vd,
VDAgentMessage *msg)
vd->caps = caps->caps[0];
if (caps->request) {
- vdagent_send_caps(vd);
+ vdagent_send_caps(vd, false);
}
if (have_mouse(vd) && vd->mouse_hs) {
qemu_input_handler_activate(vd->mouse_hs);
@@ -885,6 +886,7 @@ static void vdagent_chr_set_fe_open(struct Chardev *chr,
int fe_open)
return;
}
+ vdagent_send_caps(vd, true);
}
static void vdagent_chr_parse(QemuOpts *opts, ChardevBackend *backend,
--
2.45.2.827.g557ae147e6
- [PULL 0/8] Ui patches, marcandre . lureau, 2024/07/22
- [PULL 1/8] vnc: increase max display size, marcandre . lureau, 2024/07/22
- [PULL 2/8] virtio-gpu-gl: declare dependency on ui-opengl, marcandre . lureau, 2024/07/22
- [PULL 3/8] Cursor: 8 -> 1 bit alpha downsampling improvement, marcandre . lureau, 2024/07/22
- [PULL 4/8] ui: add more tracing for dbus, marcandre . lureau, 2024/07/22
- [PULL 5/8] ui/vdagent: improve vdagent_fe_open() trace, marcandre . lureau, 2024/07/22
- [PULL 7/8] ui/vdagent: send caps on fe_open,
marcandre . lureau <=
- [PULL 6/8] ui/vdagent: notify clipboard peers of serial reset, marcandre . lureau, 2024/07/22
- [PULL 8/8] chardev/char-win-stdio.c: restore old console mode, marcandre . lureau, 2024/07/22
- Re: [PULL 0/8] Ui patches, Philippe Mathieu-Daudé, 2024/07/22
- Re: [PULL 0/8] Ui patches, Richard Henderson, 2024/07/23