diff options
author | skuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-14 11:49:52 +0000 |
---|---|---|
committer | skuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-14 11:49:52 +0000 |
commit | d1c2ab117942b72556e987a209cb0068acc8d907 (patch) | |
tree | 0e2cdd190053fe28d0c14db2bd1b24b24a478d83 /ash/wm/app_list_controller.cc | |
parent | f013a0888b5b33b7abffa6c4396cc4a06ea686b3 (diff) | |
download | chromium_src-d1c2ab117942b72556e987a209cb0068acc8d907.zip chromium_src-d1c2ab117942b72556e987a209cb0068acc8d907.tar.gz chromium_src-d1c2ab117942b72556e987a209cb0068acc8d907.tar.bz2 |
Fixing problem of app list showing up in wrong location on second screen
BUG=288725
TEST=visual
Review URL: https://chromiumcodereview.appspot.com/23440036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223238 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm/app_list_controller.cc')
-rw-r--r-- | ash/wm/app_list_controller.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ash/wm/app_list_controller.cc b/ash/wm/app_list_controller.cc index d42ff42..35849bf 100644 --- a/ash/wm/app_list_controller.cc +++ b/ash/wm/app_list_controller.cc @@ -7,6 +7,7 @@ #include "ash/ash_switches.h" #include "ash/launcher/launcher.h" #include "ash/root_window_controller.h" +#include "ash/screen_ash.h" #include "ash/shelf/shelf_layout_manager.h" #include "ash/shell.h" #include "ash/shell_delegate.h" @@ -162,11 +163,16 @@ void AppListController::SetVisible(bool visible, aura::Window* window) { // will be released with AppListView on close. app_list::AppListView* view = new app_list::AppListView( Shell::GetInstance()->delegate()->CreateAppListViewDelegate()); - aura::Window* container = GetRootWindowController(window->GetRootWindow())-> + aura::RootWindow* root_window = window->GetRootWindow(); + aura::Window* container = GetRootWindowController(root_window)-> GetContainer(kShellWindowId_AppListContainer); if (ash::switches::UseAlternateShelfLayout()) { gfx::Rect applist_button_bounds = Launcher::ForWindow(container)-> GetAppListButtonView()->GetBoundsInScreen(); + // We need the location of the button within the local screen. + applist_button_bounds = ash::ScreenAsh::ConvertRectFromScreen( + root_window, + applist_button_bounds); view->InitAsBubbleAttachedToAnchor( container, pagination_model_.get(), |