Commit 41066cf8 authored by Xiaoqian Dai's avatar Xiaoqian Dai Committed by Commit Bot

Cros splitscreen: Stack the dragged window below the snapped window during dragging.

Bug: 809298
Change-Id: I7d8b5e5e9a792b689129937c912bc16e6ef2e053
Reviewed-on: https://chromium-review.googlesource.com/950139Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Commit-Queue: Xiaoqian Dai <xdai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542220}
parent a8926bf2
...@@ -1304,6 +1304,19 @@ void WindowSelectorItem::StartDrag() { ...@@ -1304,6 +1304,19 @@ void WindowSelectorItem::StartDrag() {
widget_window->parent()->StackChildAtTop(widget_window); widget_window->parent()->StackChildAtTop(widget_window);
widget_window->parent()->StackChildBelow(window, widget_window); widget_window->parent()->StackChildBelow(window, widget_window);
} }
// If split view mode is actvie and there is already a snapped window, stack
// this item's window below the snapped window. Note: this should be temporary
// for M66, see https://crbug.com/809298 for details.
if (Shell::Get()->IsSplitViewModeActive()) {
aura::Window* snapped_window =
Shell::Get()->split_view_controller()->GetDefaultSnappedWindow();
if (widget_window && widget_window->parent() == window->parent() &&
widget_window->parent() == snapped_window->parent()) {
widget_window->parent()->StackChildBelow(widget_window, snapped_window);
widget_window->parent()->StackChildBelow(window, widget_window);
}
}
} }
void WindowSelectorItem::EndDrag() { void WindowSelectorItem::EndDrag() {
......
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