• Bret Sepulveda's avatar
    Reland: Use the real mouse position when synthesizing mouse events. · e35026fa
    Bret Sepulveda authored
    Aura synthesizes a mouse event at certain times, including when the
    window comes back from being minimized. Currently it uses the last known
    mouse position, which works in most cases. However, the window doesn't
    get mouse events when minimized, so the last known position isn't
    updated. When the window comes back, if the user's mouse is not over the
    window it can cause buttons to get stuck in the hovered state until the
    user moves the mouse back into the window.
    
    To fix this, this patch uses the real mouse position.
    
    This patch also updates content_shell to move the mouse to 0,0 in
    headless mode, to avoid any queries to the real mouse position from
    interfering with blink tests. This patch also adds an implementation
    for MoveCursorTo on Windows.
    
    Bug: 828591, 834166
    Change-Id: I81354c77805c1928eb0cbccb900856a8c523709d
    Reviewed-on: https://chromium-review.googlesource.com/1022959Reviewed-by: default avatarMike West <mkwst@chromium.org>
    Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
    Commit-Queue: Bret Sepulveda <bsep@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#555843}
    e35026fa
window_event_dispatcher.h 13.3 KB