Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vmnetx.ui.view: Fix missing guest mouse cursor in some sessions
We can't use channel.connect() to connect a GObject signal because SpiceChannel overrides connect() to mean "initiate a TCP connection". Instead, we were using channel.connect_object(..., channel), but this creates a reference cycle between the channel PyGObject and the underlying GObject. With connect(), the PyGObject would be destroyed after _new_channel() and recreated (pointing to the same GObject) before the _request_fd() callback. With connect_object(), the PyGObject is referenced from the signal handler closure and so is never freed. However, if the Python GC runs between _new_channel() and _request_fd(), it will detect a reference cycle and clear the PyGObject's reference to the GObject. This was happening to the cursor channel on RHEL 6; _request_fd() would receive an invalid PyGObject and then swallow the resulting TypeError. As a result, the cursor channel would never be connected, and the guest cursor (for VMs supporting a hardware cursor) would always be invisible. Use connect() instead of connect_object(), explicitly calling it through the superclass.
- Loading branch information