Commit dad848c2 authored by sky's avatar sky Committed by Commit bot

Fixes resizing windows outside their bounds with ash-mus

The resize handlers are now necessary as aura-mus dispatches events
using the same path as aura non-mus. Without this change the
MoveEventHandler installed on the window in the mash side doesn't get
events and resize fails.

BUG=none
TEST=none
R=msw@chromium.org

Review-Url: https://codereview.chromium.org/2618113002
Cr-Commit-Position: refs/heads/master@{#442097}
parent dc3d7f9a
...@@ -796,12 +796,6 @@ void WmWindowAura::HideResizeShadow() { ...@@ -796,12 +796,6 @@ void WmWindowAura::HideResizeShadow() {
void WmWindowAura::InstallResizeHandleWindowTargeter( void WmWindowAura::InstallResizeHandleWindowTargeter(
ImmersiveFullscreenController* immersive_fullscreen_controller) { ImmersiveFullscreenController* immersive_fullscreen_controller) {
if (aura::Env::GetInstance()->mode() == aura::Env::Mode::MUS) {
// TODO(sky): I believe once ImmersiveFullscreenController is ported this
// won't be necessary in mash, but I need to verify that:
// http://crbug.com/548435.
return;
}
window_->SetEventTargeter(base::MakeUnique<ResizeHandleWindowTargeter>( window_->SetEventTargeter(base::MakeUnique<ResizeHandleWindowTargeter>(
window_, immersive_fullscreen_controller)); window_, immersive_fullscreen_controller));
} }
...@@ -823,14 +817,16 @@ void WmWindowAura::SnapToPixelBoundaryIfNecessary() { ...@@ -823,14 +817,16 @@ void WmWindowAura::SnapToPixelBoundaryIfNecessary() {
void WmWindowAura::SetChildrenUseExtendedHitRegion() { void WmWindowAura::SetChildrenUseExtendedHitRegion() {
children_use_extended_hit_region_ = true; children_use_extended_hit_region_ = true;
if (aura::Env::GetInstance()->mode() == aura::Env::Mode::MUS)
return;
gfx::Insets mouse_extend(-kResizeOutsideBoundsSize, -kResizeOutsideBoundsSize, gfx::Insets mouse_extend(-kResizeOutsideBoundsSize, -kResizeOutsideBoundsSize,
-kResizeOutsideBoundsSize, -kResizeOutsideBoundsSize,
-kResizeOutsideBoundsSize); -kResizeOutsideBoundsSize);
gfx::Insets touch_extend = gfx::Insets touch_extend =
mouse_extend.Scale(kResizeOutsideBoundsScaleForTouch); mouse_extend.Scale(kResizeOutsideBoundsScaleForTouch);
// TODO: EasyResizeWindowTargeter makes it so children get events outside
// their bounds. This only works in mash when mash is providing the non-client
// frame. Mus needs to support an api for the WindowManager that enables
// events to be dispatched to windows outside the windows bounds that this
// function calls into. http://crbug.com/679056.
window_->SetEventTargeter(base::MakeUnique<::wm::EasyResizeWindowTargeter>( window_->SetEventTargeter(base::MakeUnique<::wm::EasyResizeWindowTargeter>(
window_, mouse_extend, touch_extend)); window_, mouse_extend, touch_extend));
} }
......
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