| Summary: | mouse right-click does not work on the host after stop guest with spicevmc | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Mike Cao <bcao> | ||||
| Component: | spice-vdagent-win | Assignee: | David Blechter <dblechte> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Desktop QE <desktop-qa-list> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | --- | CC: | acathrow, cfergeau, cpelland, dblechte, juzhang, michen, mkenneth, mkrcmari, shuang, tburke, virt-maint | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Windows | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | vdagent-win-0.1-9 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-01-21 15:11:57 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
|
Description
Mike Cao
2011-08-18 06:47:39 UTC
I've managed to reproduce this both with a winxp and a win7 box. What I've done is * setup a windows VM with RHEV-toolsSetup_3.0_17 * open notepad or wordpad * type some text * right click/copy * switch to gedit or gnotes * right click/paste * shutdown computer from the start menu in the VM * click on "discard changes" when the text editor asks * while it's shutting down, try to use the right click button from any gtk+ app => the button doesn't seem to work It seemed to work in firefox though, but I need to run more tests to be 100% sure. The right mouse button starts working again after the VM is completely shut down. After a discussion with hansg and more investigation, this happens because the windows agent never tells the client that the agent is shutting down and that the client should release the X selection and no longer try to query it.
11:15 < hansg> What I think is happening is that gedit / sticky notes sends a
clipboard message to the current clipboard owner on right
click, before drawing the menu. And the popup menu does not
get drawn because the client is the clipboard owner, forwards
the message to the agent in the vm, and the agent never answer
because the vm is shutting down
11:16 < hansg> The fix would be for the agent in the vm to send a clipboard
release message as soon as the shutdown starts
11:17 < hansg> Then the client will release the clipboard of the
client-machine
11:17 < hansg> So I would move the bug over to the windows agent with the
above explanation of what we believe is going on (I'm pretty
sure this is the case)
I checked that when right clicking in gedit, RedClient::send_agent_clipboard_message is called and a message is sent to spice-server, but the answer never comes back.
(In reply to comment #2) > After a discussion with hansg and more investigation, this happens because the > windows agent never tells the client that the agent is shutting down and that > the client should release the X selection and no longer try to query it. > > 11:15 < hansg> What I think is happening is that gedit / sticky notes sends a > clipboard message to the current clipboard owner on right > click, before drawing the menu. And the popup menu does not > get drawn because the client is the clipboard owner, forwards > the message to the agent in the vm, and the agent never answer > because the vm is shutting down > 11:16 < hansg> The fix would be for the agent in the vm to send a clipboard > release message as soon as the shutdown starts > 11:17 < hansg> Then the client will release the clipboard of the > client-machine > 11:17 < hansg> So I would move the bug over to the windows agent with the > above explanation of what we believe is going on (I'm pretty > sure this is the case) > > I checked that when right clicking in gedit, > RedClient::send_agent_clipboard_message is called and a message is sent to > spice-server, but the answer never comes back. Why not just call Platform::on_clipboard_release() from RedClient::handle_agent_disconnected(), which is called anyway when agent is stopped? I just tried that, RedClient::handle_agent_disconnected is called while the VM is shutting down, so I could add the call there. The result is that it helps somewhat, ie mouse clicks become functional again more quickly. However, there's still a window when mouse clicks are blocked between the click on "shutdown" in windows and the time RedClient::handle_agent_disconnected, and this takes a few seconds here so it's still noticeable. Created attachment 534751 [details]
release clipboard ownership on agent stop & desktop switch
This patch solves buggy agent behavior, and it's not risky from other perspectives. Proposing to rhevm‑3.0.0. Verified on vdagent-win-0.1-9. (based on steps from comment #2) |