winex11: Update the window cursor at most once every 100ms if nothing changed.

This commit is contained in:
Alexandre Julliard 2011-02-24 12:14:58 +01:00
parent 94fb0f5935
commit b7987db36f
1 changed files with 6 additions and 2 deletions

View File

@ -265,8 +265,12 @@ static HWND update_mouse_state( HWND hwnd, Window window, int x, int y, unsigned
pt->x = data->client_rect.right - data->client_rect.left - 1 - pt->x;
MapWindowPoints( hwnd, 0, pt, 1 );
cursor_window = hwnd;
sync_window_cursor( data );
if (InterlockedExchangePointer( (void **)&cursor_window, hwnd ) != hwnd ||
GetTickCount() - last_time_modified > 100)
{
cursor_window = hwnd;
sync_window_cursor( data );
}
if (hwnd != GetDesktopWindow()) hwnd = GetAncestor( hwnd, GA_ROOT );
/* update the wine server Z-order */