Commit d0e06a47 authored by Sammie Quon's avatar Sammie Quon Committed by Commit Bot

wm: Fix drag to maximize for touches on bezel.

I forget why i put the extra check in the first place, I think did it
in case the displays are stacked vertically and dragging i thought maybe
dragging from the bottom to top display would trigger a maximize. But
we pass the display as well, so that is not a problem. Removing the
extra check allows for touch dragging on bezel.

Test: manual
Fixed: 1081985
Change-Id: I5a58eb7874b109f7403a9fe383f27e5bf9fa87e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2218506Reviewed-by: default avatarXiaoqian Dai <xdai@chromium.org>
Commit-Queue: Sammie Quon <sammiequon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772405}
parent 93e97c4d
......@@ -338,14 +338,13 @@ WorkspaceWindowResizer::SnapType GetSnapType(
insets.set_top(kScreenEdgeInsetForSnapping);
area.Inset(insets);
if (location_in_screen.x() <= area.x()) {
if (location_in_screen.x() <= area.x())
return WorkspaceWindowResizer::SnapType::kLeft;
} else if (location_in_screen.x() >= area.right() - 1) {
else if (location_in_screen.x() >= area.right() - 1)
return WorkspaceWindowResizer::SnapType::kRight;
} else if (location_in_screen.y() <= area.y() &&
location_in_screen.y() >= display.bounds().y()) {
else if (location_in_screen.y() <= area.y())
return WorkspaceWindowResizer::SnapType::kMaximize;
}
return WorkspaceWindowResizer::SnapType::kNone;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment