WineHQ
Comments
 

The following comments are owned by whoever posted them. WineHQ is not responsible for what they say.

RE: mouse workaround
by Phluffy on Friday February 4th 2011, 21:12
Thank you very much Nick, not only for helping me, but for helping others in earlier posts. However, I'm still confused on this mouse workaround.

I find the code under this function (sorry for posting the whole thing, I think this is the way to be most clear):
/*********************************************************************
* SetCursorPos ( X11DRV.@)
*/
BOOL CDECL X11DRV_SetCursorPos( INT x, INT y )
{
Display *display = thread_init_display();
POINT pt;

TRACE( "warping to (%d,%d)\n", x, y );

wine_tsx11_lock();
if (cursor_pos.x == x && cursor_pos.y == y)
{
wine_tsx11_unlock();
/* We still need to generate WM_MOUSEMOVE */
queue_raw_mouse_message( WM_MOUSEMOVE, 0, 0, x, y, 0, GetCurrentTime(), 0, 0 );
return TRUE;
}

pt.x = x; pt.y = y;
clip_point_to_rect( &cursor_clip, &pt);
XWarpPointer( display, root_window, root_window, 0, 0, 0, 0,
pt.x - virtual_screen_rect.left, pt.y - virtual_screen_rect.top );
XFlush( display ); /* avoids bad mouse lag in games that do their own mouse warping */
cursor_pos = pt;
wine_tsx11_unlock();
return TRUE;
}

Is this not the correct location? Should I replace:

queue_raw_mouse_message( WM_MOUSEMOVE, 0, 0, x, y, 0, GetCurrentTime(), 0, 0 );

with:
queue_raw_mouse_message( WM_MOUSEMOVE, NULL, NULL, x, y, 0, GetCurrentTime(), 0, 0 );

I thought this was the location you were speaking about in your previous post. Please clarify. Thank you again for your assistance.

[post new] [reply to this]

Page loaded in 0.00489 seconds.