• Sammie Quon's avatar
    wm: Dragged windows position takes into account caption container. · eaf0a6b2
    Sammie Quon authored
    When dragging a maximized window, the window may resize. We try to
    position the window so that the ratio between origin and event
    location and width remains equal.
    
    The caption buttons have the same size even if the window shrinks
    though, so if the original click was near the caption buttons, the
    ratio result may end up on top of the caption buttons. This CL
    addresses them by checking the position of the caption and shifting
    the new window bounds such that the mouse will not be on top of the
    caption buttons.
    
    This won't have an effect on custom headers, as theres no way to
    determine how large their caption area is.
    
    Test: manual
    Change-Id: I15b235dae773fe90283ffabf9daff0e4ac984e24
    Fixed: 1082839
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2238415Reviewed-by: default avatarMitsuru Oshima (slow:gardening) <oshima@chromium.org>
    Commit-Queue: Sammie Quon <sammiequon@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#779874}
    eaf0a6b2
frame_header.h 4.96 KB