summaryrefslogtreecommitdiffstats
path: root/ui/aura/env.cc
diff options
context:
space:
mode:
authoryusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-24 20:53:23 +0000
committeryusukes@chromium.org <yusukes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-24 20:53:23 +0000
commit718b26cd02ffe63b82650e81cb9bb5b0634d62c7 (patch)
treea7b16b40dfe8f344b31b5c575c5acb61cb7f1af7 /ui/aura/env.cc
parenta6b4ee0441f5e7199c583f924056dca14b889208 (diff)
downloadchromium_src-718b26cd02ffe63b82650e81cb9bb5b0634d62c7.zip
chromium_src-718b26cd02ffe63b82650e81cb9bb5b0634d62c7.tar.gz
chromium_src-718b26cd02ffe63b82650e81cb9bb5b0634d62c7.tar.bz2
Move last_mouse_location_ from aura::RootWindow to aura::Env to support multiple root windows.
BUG=136814 TEST=1) the new ash_unittests as well as existing tests passed. 2) ran ash_shell by './out/Release/ash_shell --ash-extended-desktop --aura-host-window-size=100+0-500x500,610+0-300x300 --ash-virtual-screen-coordinates', then move the cursor to the second (right hand side) window, then click the right button. confirmed that the popup menu is shown on the right window. Review URL: https://chromiumcodereview.appspot.com/10781028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148193 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/env.cc')
-rw-r--r--ui/aura/env.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/aura/env.cc b/ui/aura/env.cc
index 977e7ca..60bca1a 100644
--- a/ui/aura/env.cc
+++ b/ui/aura/env.cc
@@ -5,6 +5,7 @@
#include "ui/aura/env.h"
#include "base/command_line.h"
+#include "ui/aura/client/screen_position_client.h"
#include "ui/aura/cursor_manager.h"
#include "ui/aura/env_observer.h"
#include "ui/aura/event_filter.h"
@@ -60,6 +61,15 @@ void Env::RemoveObserver(EnvObserver* observer) {
observers_.RemoveObserver(observer);
}
+void Env::SetLastMouseLocation(const Window& window,
+ const gfx::Point& location_in_root) {
+ last_mouse_location_ = location_in_root;
+ client::ScreenPositionClient* client =
+ client::GetScreenPositionClient(window.GetRootWindow());
+ if (client)
+ client->ConvertPointToScreen(&window, &last_mouse_location_);
+}
+
void Env::SetDisplayManager(DisplayManager* display_manager) {
display_manager_.reset(display_manager);
#if defined(USE_X11)