• Joe Downing's avatar
    Do not reshow the disconnect window for small mouse movements · edc50bc7
    Joe Downing authored
    This change adds a fudge factor of ~1px to the logic which determines
    whether to reshow the disconnect window after it has been hidden.
    I suspect the reports of the window being reshown are due to small
    accumulations for the cursor position or potentially just raw input
    events where the cursor does not change.  We want to avoid reshowing
    the dialog in cases such as this because it is quite annoying for the
    remote user.
    
    Bug: 891584
    
    Ignore mouse messages if the position or button states don't change
    
    We've received reports that the disconnect window is appearing at
    odd times after the auto-hide timeout has taken effect.  I suspect
    there could be hardware which is emitting spurious HID events which
    is triggering the reshow logic.  My assumption is that this behavior
    is't egregious, otherwise the user would notice the mouse cursor
    moving or errant keypresses.  Thus I want to prevent triggering the
    reshow logic if we receive a RAWINPUT event where the cursor has not
    moved and no button states have changed.
    
    Change-Id: I310f2cb4a5f30b0b7e14bf7221d250030492add8
    Reviewed-on: https://chromium-review.googlesource.com/c/1258979
    Commit-Queue: Joe Downing <joedow@chromium.org>
    Reviewed-by: default avatarJamie Walch <jamiewalch@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#596308}
    edc50bc7
disconnect_window_win.cc 17.6 KB