Lauri Kenttä lauri.kentta@gmail.com writes:
On Wed, 18 May 2011 10:57:24 +0200, Alexandre Julliard wrote:
That won't really do what you want. Why do you need this?
Then what does it do wrong? It seems to do exactly what I want and mostly what Windows does.
The clip rectangle is only valid while the pointer is grabbed, in which case the cursor pos will be clipped already. So for the case where the pointer is not grabbed (for instance if you don't have XInput) it would have to go through the wineserver.
The clipping is necessary for games using Infinite Engine (e.g. Baldur's Gate) for border scrolling when using virtual desktop. Otherwise it's next to impossible to scroll because the game only checks for one pixel at the border (e.g. x == 0) but Wine currently returns also values that never occur on Windows (e.g. x == -1).
Have you tried the new desktop clipping mode?
On Wed, 18 May 2011 12:22:57 +0200, Alexandre Julliard wrote:
The clip rectangle is only valid while the pointer is grabbed, in which case the cursor pos will be clipped already.
That's true. I only tested the other case.
So for the case where the pointer is not grabbed (for instance if you don't have XInput) it would have to go through the wineserver.
So is it then possible to clip the cursor to the virtual desktop in the wineserver, or do you see some apparent problem there? I would be surprised if this was the only application to choke on strange mouse coordinates.
Have you tried the new desktop clipping mode?
Sorry, I missed that because of missing XI2. That indeed fixes the clipping (but only when the window is active) and works fine with an external mouse.
With my touchpad the results are much more interesting. The cursor moves slowly (around 1/3 of normal speed) but warps once per second to where it really should be. When the cursor stops, the game starts polling with GetCursorPos and the cursor warps again to the correct position. The TRACE in GetCursorPos shows that "server pos" follows the slower movement and is different from what the function returns.
Maybe I should file a bug about that?
Lauri Kenttä lauri.kentta@gmail.com writes:
So is it then possible to clip the cursor to the virtual desktop in the wineserver, or do you see some apparent problem there? I would be surprised if this was the only application to choke on strange mouse coordinates.
It's possible, but it's not clear that it's desirable. Pretending that the mouse is still inside the desktop when it has left can lead to strange behaviors too. I think enabling clipping for these apps is a better solution.
With my touchpad the results are much more interesting. The cursor moves slowly (around 1/3 of normal speed) but warps once per second to where it really should be. When the cursor stops, the game starts polling with GetCursorPos and the cursor warps again to the correct position. The TRACE in GetCursorPos shows that "server pos" follows the slower movement and is different from what the function returns.
Maybe I should file a bug about that?
Most likely because XInput raw events don't take acceleration into account. I'm not sure there's a whole lot we can do about that.
Alexandre Julliard writes:
Lauri Kenttä lauri.kentta@gmail.com writes:
With my touchpad the results are much more interesting.
Most likely because XInput raw events don't take acceleration into account. I'm not sure there's a whole lot we can do about that.
I've disabled acceleration, and the problem persists. Unless there's some very well hidden option that doesn't react to xset or xinput.
Alexandre Julliard writes:
I think enabling clipping for these apps is a better solution.
But clearly that's not an option if the user has a tablet (or other absolute pointing device) and a touchpad (at least my touchpad). Even if the touchpad problem could be avoided by disabling acceleration, that's a pain for the user and makes the touchpad behave differently from what the user is used to.
What about adding this feature along with a registry key? The implementation is only a few lines and works great in my case.
Of course, this is not an essential feature, as the app works fine in real full-screen mode. So I won't press this any more.