On Sun, 2014-07-06 at 17:22 +1000, Benjamin Herrenschmidt wrote: > > - With SDL, the cursor quickly goes bonkers, starts jumping around all > over the place, I'm not sure what exactly is going on here. It starts ok > but as soon as one does a too fast movement, it's dead.
At least this one also happens with gtk and appears to be the guest (NT4) "warping" the cursor to the edges of the screen as soon as you start moving too quickly. I'm not quite sure what's going on yet, so far I've seen us send reasonable deltas down. I *suspect* it might have to do with NT's own mouse acceleration scheme. The way we do the relative mouse stuff, we more/less assume that the diff we send down gets applied "as is". It's not and thus we warp which causes funny artifacts and when it gets too big, things get nasty inside NT4 itself as far as I can tell (but I may well have missed something). The problem is that when using relative mouses, we can't really assume that there is any relationship between the absolute position of the host cursor vs. the guest cursor, we should only operate in deltas and even then, we probably want to dampen them to compensate for the guest own acceleration. But that means that the guest HW cursor is never quite where the host cursor is. So unless the guest draws its own (or something like VNC can draw one), we have a problem. I'm thinking that for relative mouse, we should probably draw a cursor ourselves by moving / drawing the cursor pixmap on top of the display pixmap at the UI backend (gtk/SDL) level... Or am I missing a big part of the puzzle ? Cheers, Ben.