• Sammie Quon's avatar
    capture_mode: Properly handle display rotation and bounds change. · e271ea4d
    Sammie Quon authored
    For all modes for either rotation/bounds change:
      - End current drag
      - Redraw capture session layer
      - Reposition capture label and capture bar
    
    Additionally for region:
      - Reset selection region if rotation changes
      - Clamp the selection region to root window bounds if size changes
    
    Also fixes a bug where the user can select a large region on a display,
    exit and then enter capture mode on a smaller display. This CL will
    ensure the initial region is clamped to size of the smaller display.
    
    Fixed: 1154465
    Test: manual + added
    Change-Id: I4dde6b97af9532d08f7e53348d7a8a28c0c38714
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2568669
    Commit-Queue: Sammie Quon <sammiequon@chromium.org>
    Reviewed-by: default avatarAhmed Fakhry <afakhry@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#834529}
    e271ea4d
capture_mode_controller.cc 31.8 KB