Commit 1672701a authored by Elliot Glaysher's avatar Elliot Glaysher Committed by Commit Bot

Fix dead area after a chrome app is started in --mus.

After starting a chrome native app in --mus, the top 33 pixels of the
screen no longer accept mouse input. This was because code that is mash
only (which set the non-client area for a new window) was being run in
all mus contexts, meaning opening an app gave the ash RootWindow a
non-client area.

This was especially bad since a native welcome app is launched on first
login, meaning under --mus, you couldn't interact with the skyline
during your first session.

Bug: 794285
Change-Id: I1dc69dc8fd48fb174ecc1db3198844a74b8a0e44
Reviewed-on: https://chromium-review.googlesource.com/825651Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Elliot Glaysher <erg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523922}
parent 03b21ae3
......@@ -21,6 +21,7 @@
#include "ash/wm/window_state_delegate.h"
#include "ash/wm/window_state_observer.h"
#include "base/logging.h"
#include "chrome/browser/chromeos/ash_config.h"
#include "chrome/browser/chromeos/note_taking_helper.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profiles_state.h"
......@@ -32,7 +33,6 @@
#include "services/ui/public/cpp/property_type_converters.h"
#include "services/ui/public/interfaces/window_manager.mojom.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/env.h"
#include "ui/aura/mus/property_converter.h"
#include "ui/aura/mus/window_tree_host_mus.h"
#include "ui/aura/window.h"
......@@ -403,7 +403,7 @@ void ChromeNativeAppWindowViewsAuraAsh::UpdateDraggableRegions(
SkRegion* draggable_region = GetDraggableRegion();
// Set the NativeAppWindow's draggable region on the mus window.
if (draggable_region && !draggable_region->isEmpty() && widget() &&
aura::Env::GetInstance()->mode() == aura::Env::Mode::MUS) {
chromeos::GetAshConfig() == ash::Config::MASH) {
// Supply client area insets that encompass all draggable regions.
gfx::Insets insets(draggable_region->getBounds().bottom(), 0, 0, 0);
......
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