summaryrefslogtreecommitdiffstats
path: root/ui
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 /ui
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 'ui')
-rw-r--r--ui/views/widget/root_view.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/views/widget/root_view.cc b/ui/views/widget/root_view.cc
index 2a71020..02a772e 100644
--- a/ui/views/widget/root_view.cc
+++ b/ui/views/widget/root_view.cc
@@ -498,6 +498,12 @@ void RootView::OnMouseReleased(const ui::MouseEvent& event) {
if (mouse_pressed_handler_) {
ui::MouseEvent mouse_released(event, static_cast<View*>(this),
mouse_pressed_handler_);
+ // TODO(sadrul|oshima): This is tentative solution to pass target
+ // to LauncherDelegate::ItemClicked. Remove this once crbug.com/173235
+ // is implemented.
+ ui::Event::DispatcherApi api(&mouse_released);
+ api.set_target(this);
+
// We allow the view to delete us from ProcessMouseReleased. As such,
// configure state such that we're done first, then call View.
View* mouse_pressed_handler = mouse_pressed_handler_;