Commit 4b59f33e authored by Mitsuru Oshima's avatar Mitsuru Oshima Committed by Commit Bot

Set kAppType to system level windows as well.

IME uses this propery to tell if it's arc windows.
With this fix, text input on type type window (e.g.
FB ChatHead) works again.

BUG=b/111713229
TEST=manual. See bug for repro step.

Change-Id: Ifa058f3a4c4c91daf7059311044c4440780f47ad
Reviewed-on: https://chromium-review.googlesource.com/1148237Reviewed-by: default avatarYury Khmel <khmel@chromium.org>
Commit-Queue: Mitsuru Oshima <oshima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577633}
parent c6ed5baf
......@@ -210,6 +210,12 @@ void ArcAppWindowLauncherController::AttachControllerToWindowsIfNeeded() {
void ArcAppWindowLauncherController::AttachControllerToWindowIfNeeded(
aura::Window* window) {
const int task_id = GetWindowTaskId(window);
if (task_id >= 0) {
// System windows are also arc apps.
window->SetProperty(aura::client::kAppType,
static_cast<int>(ash::AppType::ARC_APP));
}
if (task_id <= 0)
return;
......@@ -220,8 +226,6 @@ void ArcAppWindowLauncherController::AttachControllerToWindowIfNeeded(
// TODO(msw): Set shelf item types earlier to avoid ShelfWindowWatcher races.
// (maybe use Widget::InitParams::mus_properties in cash too crbug.com/750334)
window->SetProperty<int>(ash::kShelfItemTypeKey, ash::TYPE_APP);
window->SetProperty(aura::client::kAppType,
static_cast<int>(ash::AppType::ARC_APP));
// Create controller if we have task info.
AppWindowInfo* info = GetAppWindowInfoForTask(task_id);
......
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