-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MouseDrag - Pointer not drawn on screen #54
Comments
Increasing the sleep here might help and if so it could be exposed as a command line arg rather than hardcoded. |
This is what I did - I increased this timeout to the daring 1.2 seconds but it didn't help. However, the cursor is drawn/restored in the end of the MouseDrag when we arrive at the destination position. I also tried reducing the step size to 1 pixel and increasing the timeout to 1.2 seconds but the mouse remains invisible until it reaches the end destination (which also lasts a lot for this step size and timeout among steps). |
Hi Pevogam, I am glad to be here in this conversation. |
I would expect the cursor to be drawn on a physical host display but perhaps not on any vnc or remote displays. Depending on how the vnc server and clients are implemented they might be busy processing the setCursor commands rather than sending screen or cursor refreshes. Making the cursor visible was outside the design scope of the drag command. I'm curious what use case you have that requires it to be visible thoughout the operation? |
Thanks for the reply.
"Making the cursor visible was outside the design scope of the drag command. I'm curious what use case you have that requires it to be visible thoughout the operation? "
mayb am not sure, the command which i mentioned might be wrong one. Thanks. |
Hello Sibson, Any suggestion plz |
On my mobile there is no such thing as a cursor unless I attach a mouse to it via USB. Perhaps some developer option might help to visualize the current drag position. Fun fact: I'd vote that there is a cursor shown, but it is the invisible one. |
I ended up facing the same problem as pevogam described. I've investigated it a little and here's what I think that happens:
When we call The transport that the protocol is using is the TLS Transport, which delegates the write operation to The reactor is an The The only solution I could find is to add a call to |
@samiraguiar I think you're on the right track here. |
The `mouseDrag()` method is called during the reactor loop and all of its calls to `mouseMove()` will be buffered as the reactor won't check the underlying socket while that method is running. That means that all the move operations will be sent at once to the VNC server *after* `mouseDrag()` has executed and the cursor will jump straight to the final location. The `sleep()` calls in the drag method should prevent this, but since they are not yielded to the reactor they have no effect. A simple solution is to call `reactor.doPoll()` after each `mouseMove()` to make sure that the socket is polled by the reactor and that the previous move command is sent to the VNC Server. This fixes issue sibson#54.
The `mouseDrag()` method is called during the reactor loop and all of its calls to `mouseMove()` will be buffered as the reactor won't check the underlying socket while that method is running. That means that all the move operations will be sent at once to the VNC server *after* `mouseDrag()` has executed and the cursor will jump straight to the final location. The `sleep()` calls in the drag method should prevent this, but since they are not yielded to the reactor they have no effect. A simple solution is to call `reactor.doPoll()` after each `mouseMove()` to make sure that the socket is polled by the reactor and that the previous move command is sent to the VNC Server. This fixes issue sibson#54.
The `mouseDrag()` method is called during the reactor loop and all of its calls to `mouseMove()` will be buffered as the reactor won't check the underlying socket while that method is running. That means that all the move operations will be sent at once to the VNC server *after* `mouseDrag()` has executed and the cursor will jump straight to the final location. The `sleep()` calls in the drag method should prevent this, but since they are not yielded to the reactor they have no effect. A simple solution is to call `reactor.doPoll()` after each `mouseMove()` to make sure that the socket is polled by the reactor and that the previous move command is sent to the VNC Server. This fixes issue sibson#54.
Closing as this was solved, thanks @samiraguiar and @sibson! |
Hi Marc,
Do you know if the cursor is supposed to be drawn during a mouse drag operation? Currently, using Fedora virtual machine and a Qemu hypervisor (for instance but also noticed on other OS vms) the mouse is not drawn during the drag calculations with any step size and extra timeouts until it reaches the last position when it is updated. Is there a way to force the cursor to be drawn on screen?
Thanks a lot,
The text was updated successfully, but these errors were encountered: