JesusFreke wrote:
dlls/winex11.drv/mouse.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 60351e5..7c24c64 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -1004,6 +1004,7 @@ BOOL CDECL X11DRV_SetCursorPos( INT x, INT y ) XFlush( display ); /* avoids bad mouse lag in games that do their own mouse warping */ cursor_pos = pt; wine_tsx11_unlock();
- queue_raw_mouse_message( WM_MOUSEMOVE, NULL, x, y, 0, GetCurrentTime(), 0, 0 ); return TRUE;
}
Can you explain why do you need this patch? What exactly is it fixing? And have you run any tests to verify this? I'm guessing no, because you ignored that Wine will generate mouse-move event when this operation comes back to Wine from X server.
On Sat, Oct 31, 2009 at 11:00 AM, Vitaliy Margolen wine-devel@kievinfo.comwrote:
JesusFreke wrote:
dlls/winex11.drv/mouse.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 60351e5..7c24c64 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -1004,6 +1004,7 @@ BOOL CDECL X11DRV_SetCursorPos( INT x, INT y ) XFlush( display ); /* avoids bad mouse lag in games that do their
own mouse warping */
cursor_pos = pt; wine_tsx11_unlock();
- queue_raw_mouse_message( WM_MOUSEMOVE, NULL, x, y, 0,
GetCurrentTime(), 0, 0 );
return TRUE;
}
Can you explain why do you need this patch? What exactly is it fixing? And have you run any tests to verify this? I'm guessing no, because you ignored that Wine will generate mouse-move event when this operation comes back to Wine from X server.
Sorry, first time posting a patch. I thought I had included a introduction to the patch with git send-email.
In any case, this is to fix a mouse issue in AION. The issue occurs when you right-click and drag, which moves the camera. The game frequently warps the mouse back to the center of the screen, and the camera movement is very jittery, like it might if you had manually moved the mouse back to the center of the screen (instantly). Another symptom is that if you begin the right-click drag near the top or the bottom of the screen, the camera will instantly pan down or up, like you had instantly dragged from the start location to the center of the y-axis.
I'll be honest, I don't know if this is the correct way to fix this issue. But with this patch, the mouse movement is working perfectly.
If you have any suggestions for a better fix, I would be happy to code it up and test it out with Aion.
(sorry for the double-email Vitaliy - I just realized that I didn't reply-all. And yeah, I know top posting is generally frowned upon. Sorry! :) )
On Sat, Oct 31, 2009 at 5:37 PM, JesusFreke jesusfreke@jesusfreke.com wrote:
On Sat, Oct 31, 2009 at 11:00 AM, Vitaliy Margolen wine-devel@kievinfo.com wrote:
JesusFreke wrote:
dlls/winex11.drv/mouse.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 60351e5..7c24c64 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -1004,6 +1004,7 @@ BOOL CDECL X11DRV_SetCursorPos( INT x, INT y ) XFlush( display ); /* avoids bad mouse lag in games that do their own mouse warping */ cursor_pos = pt; wine_tsx11_unlock();
- queue_raw_mouse_message( WM_MOUSEMOVE, NULL, x, y, 0,
GetCurrentTime(), 0, 0 ); return TRUE; }
Can you explain why do you need this patch? What exactly is it fixing? And have you run any tests to verify this? I'm guessing no, because you ignored that Wine will generate mouse-move event when this operation comes back to Wine from X server.
Sorry, first time posting a patch. I thought I had included a introduction to the patch with git send-email.
In any case, this is to fix a mouse issue in AION. The issue occurs when you right-click and drag, which moves the camera. The game frequently warps the mouse back to the center of the screen, and the camera movement is very jittery, like it might if you had manually moved the mouse back to the center of the screen (instantly). Another symptom is that if you begin the right-click drag near the top or the bottom of the screen, the camera will instantly pan down or up, like you had instantly dragged from the start location to the center of the y-axis.
I'll be honest, I don't know if this is the correct way to fix this issue. But with this patch, the mouse movement is working perfectly.
If you have any suggestions for a better fix, I would be happy to code it up and test it out with Aion.
(sorry for the double-email Vitaliy - I just realized that I didn't reply-all. And yeah, I know top posting is generally frowned upon. Sorry! :) )
I don't know this code that well but to me it looked like a hack as well (as I guess it will also send that event back to the app and the app shouldn't hear anything about our hacks.). These the days issue can be fixed properly on the latest Xservers which support xinput2. We need to add support for it to Wine and that would fix the issue properly. The problem is that the current code needs to be redesigned quite a bit (some part needs to be moved to explorer I believe) and then the new code can be added. Paul Hampton did a lot of work on this a while ago but I think he didn't have time to finish it. He must have code for it and if you want you could continue it (perhaps with his assistance) but it takes some effort I think.
Roderick
JesusFreke wrote:
I'll be honest, I don't know if this is the correct way to fix this issue. But with this patch, the mouse movement is working perfectly.
Have you tried disabling warping in dinput?
Your patch is an outright hack. It does something that is plain wrong. I do know that area of the code really really good.
As-is calling SetCursorPos already generates WM_MOUSEMOVE (when cursor position change comes back from X) which it shouldn't. You are adding an additional one - which is double wrong. I guess this is the case of two identical errors masking each-other resulting in non-error.
Vitaliy.