Commit 98fed5dd authored by Matthew Mourgos's avatar Matthew Mourgos Committed by Commit Bot

Disable window activation upon opening disambiguation menu for app

shortcuts on the shelf.

Bug: 951964
Change-Id: I858d99304c09846581947a0ec17d6ff6ae497585
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1564549Reviewed-by: default avatarAlex Newcomer <newcomer@chromium.org>
Reviewed-by: default avatarYury Khmel <khmel@chromium.org>
Commit-Queue: Matthew Mourgos <mmourgos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#650494}
parent ee1cab71
......@@ -183,9 +183,16 @@ void AppShortcutLauncherItemController::ItemSelected(
return;
}
const ash::ShelfAction action = ActivateContent(content);
std::move(callback).Run(
action, GetAppMenuItems(event ? event->flags() : ui::EF_NONE));
ash::MenuItemList items =
GetAppMenuItems(event ? event->flags() : ui::EF_NONE);
if (items.size() == 1) {
std::move(callback).Run(ActivateContent(content), base::nullopt);
} else {
// Multiple items, a menu will be shown. No need to activate the most
// recently active item.
std::move(callback).Run(ash::SHELF_ACTION_NONE, std::move(items));
}
}
ash::MenuItemList AppShortcutLauncherItemController::GetAppMenuItems(
......
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