-
Notifications
You must be signed in to change notification settings - Fork 69
Description
Host: Windows 10
Guest: EndeavourOS (Arch based) with Plasma 6
Virtualbox version: 7.1.10
Guest additions version: 7.1.10
Problem description
Pasting from host to guest (wayland) -> works
Pasting from guest (x11) to host -> works
Pasting from guest (wayland) to host -> doesn't work
Pinpointing the problem
I did some debugging and the problem is that this check is always false:
if (uFmt != g_DcpCtx.Session.clip.uFmt.defaults()) |
Small description of the codeflow:
vbcl_wayland_hlp_dcp_gh_clip_report_cb()
waits ong_DcpCtx.Session.clip.uFmt
and, if successful, it setsSession.clip.pvClipboardBuf
andSession.clip.cbClipboardBuf
(via a call tovbcl_wayland_hlp_dcp_receive_offer()
)vbcl_wayland_hlp_dcp_gh_clip_read_join_cb()
setsg_DcpCtx.Session.clip.uFmt
and waits onSession.clip.pvClipboardBuf
andSession.clip.cbClipboardBuf
vbcl_wayland_hlp_dcp_gh_clip_read_join_cb()
is called aftervbcl_wayland_hlp_dcp_gh_clip_report_cb()
This is a cyclic dependency that results in all those values being empty (defaulted) when read.
I think there is a logic problem here. vbcl_wayland_hlp_dcp_gh_clip_report_cb()
does 2 actions that are meant to be distinct. It both reports to the host that clipboard data is available AND copies the clipboard data to internal buffers. The latter fails because it doesn't know which format the host expects at this point.
The data should be copied only after the host requests them.