wm: Dragged windows position takes into account caption container.
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:Mitsuru Oshima (slow:gardening) <oshima@chromium.org> Commit-Queue: Sammie Quon <sammiequon@chromium.org> Cr-Commit-Position: refs/heads/master@{#779874}
Showing
Please register or sign in to comment