Commit 8d662f5e authored by Mitsuru Oshima's avatar Mitsuru Oshima Committed by Commit Bot

[reland] Don't skip updating widget when resizing ClientControlledShellSurface

ClientControlledShellSurface doesn't use configure to resize.

This is reland of https://crrev.com/c/994173/5

TBR=reveman@chromium.org
BUG=828586
TEST=manual

Change-Id: Id39f3d0ac5b680aa74fef13df7d0631d5b9ca742
Reviewed-on: https://chromium-review.googlesource.com/998339Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Commit-Queue: Mitsuru Oshima <oshima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548514}
parent a12554af
...@@ -1245,20 +1245,18 @@ bool ShellSurfaceBase::IsResizing() const { ...@@ -1245,20 +1245,18 @@ bool ShellSurfaceBase::IsResizing() const {
void ShellSurfaceBase::UpdateWidgetBounds() { void ShellSurfaceBase::UpdateWidgetBounds() {
DCHECK(widget_); DCHECK(widget_);
// Return early if the shell is currently managing the bounds of the widget.
// 1) When a window is either maximized/fullscreen/pinned, and the bounds
// are not controlled by a client.
ash::wm::WindowState* window_state = ash::wm::WindowState* window_state =
ash::wm::GetWindowState(widget_->GetNativeWindow()); ash::wm::GetWindowState(widget_->GetNativeWindow());
if (window_state->IsMaximizedOrFullscreenOrPinned() && // Return early if the shell is currently managing the bounds of the widget.
!window_state->allow_set_bounds_direct()) { if (!window_state->allow_set_bounds_direct()) {
return; // 1) When a window is either maximized/fullscreen/pinned.
if (window_state->IsMaximizedOrFullscreenOrPinned())
return;
// 2) When a window is being dragged by |resizer_|.
if (IsResizing())
return;
} }
// 2) When a window is being dragged by |resizer_|.
if (IsResizing())
return;
// Return early if there is pending configure requests. // Return early if there is pending configure requests.
if (!pending_configs_.empty() || scoped_configure_) if (!pending_configs_.empty() || scoped_configure_)
return; return;
......
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