summaryrefslogtreecommitdiffstats
path: root/ash/launcher/launcher.cc
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-01 05:10:28 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-01 05:10:28 +0000
commit90e1812936e25a1cee7298a850dfb71505ab5db2 (patch)
tree808054695725567c1bc447cab40e988855400449 /ash/launcher/launcher.cc
parent2322dc718e6a9f119ab549a6358c6043b3671007 (diff)
downloadchromium_src-90e1812936e25a1cee7298a850dfb71505ab5db2.zip
chromium_src-90e1812936e25a1cee7298a850dfb71505ab5db2.tar.gz
chromium_src-90e1812936e25a1cee7298a850dfb71505ab5db2.tar.bz2
Move the panel to the root window where the mouse click occurred.
* Change the LauncherDelegate::ItemClicked's argument from int flag to const ui::Event& * temporarily set the view's event target to RV. Sadrul is working on real solution in crbug.com/173235. I tried to add interactive_ui_tests for chrome, but turns out it's require more work as there is no interactive ui tests for extensions. I'd rather refactor launcher code so that we can test the same behavior in ash_unittests. I'll work on it and add more tests once @skuhne finished new launcher (could be 26 or 27) BUG=166195 TEST=covered by tests. Also tested on device (clicking panel icon on other display should move the panel to that display) Review URL: https://chromiumcodereview.appspot.com/12093075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180080 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/launcher/launcher.cc')
-rw-r--r--ash/launcher/launcher.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/ash/launcher/launcher.cc b/ash/launcher/launcher.cc
index 09af40c..3c9a2d9 100644
--- a/ash/launcher/launcher.cc
+++ b/ash/launcher/launcher.cc
@@ -361,7 +361,11 @@ gfx::Rect Launcher::GetScreenBoundsOfItemIconForWindow(aura::Window* window) {
void Launcher::ActivateLauncherItem(int index) {
const ash::LauncherItems& items =
launcher_view_->model()->items();
- delegate_->ItemClicked(items[index], ui::EF_NONE);
+ ui::MouseEvent event(ui::ET_MOUSE_PRESSED,
+ gfx::Point(),
+ gfx::Point(),
+ ui::EF_NONE);
+ delegate_->ItemClicked(items[index], event);
}
void Launcher::CycleWindowLinear(CycleDirection direction) {