Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Unified Diff: chrome/browser/ui/ash/launcher/shell_window_launcher_item_controller.cc

Issue 12093075: Move the panel to the root window where the mouse click occurred. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/launcher/shell_window_launcher_item_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/shell_window_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/shell_window_launcher_item_controller.cc
index 2a43c2637a45a4af38cc453b7975094c7ee7ef01..1631823a7690554ae53cc4a86f8d31c8c57ace2f 100644
--- a/chrome/browser/ui/ash/launcher/shell_window_launcher_item_controller.cc
+++ b/chrome/browser/ui/ash/launcher/shell_window_launcher_item_controller.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/ui/ash/launcher/shell_window_launcher_item_controller.h"
+#include "ash/launcher/launcher_util.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_v2app.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
@@ -115,11 +116,15 @@ void ShellWindowLauncherItemController::Close() {
// * Multiple windows:
// ** If the first window is not active, activate it.
// ** Otherwise activate the next window.
-void ShellWindowLauncherItemController::Clicked() {
+void ShellWindowLauncherItemController::Clicked(const ui::Event& event) {
if (shell_windows_.empty())
return;
ShellWindow* first_window = shell_windows_.front();
if (shell_windows_.size() == 1) {
+ ash::launcher::MoveToEventRootIfPanel(first_window->GetNativeWindow(),
+ event);
+ // If the window moves, it becomes inactive first then
+ // gets activated.
stevenjb 2013/01/31 20:23:40 nit: 'then gets activated later'?
oshima 2013/01/31 20:37:41 changed to "then gets activated in |RestoreOrShow|
if (first_window->GetBaseWindow()->IsActive())
first_window->GetBaseWindow()->Minimize();
else

Powered by Google App Engine
This is Rietveld 408576698