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

Unified Diff: ui/aura/monitor_manager.cc

Issue 9808010: Keep the mouse cursor within desktop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 9 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: ui/aura/monitor_manager.cc
diff --git a/ui/aura/monitor_manager.cc b/ui/aura/monitor_manager.cc
index c5f8d6ad88bb368a9e617331faf1c8ca1ca01ee9..ee0bf5255a07c8b11d6ab79db3fffeecc9b4c50a 100644
--- a/ui/aura/monitor_manager.cc
+++ b/ui/aura/monitor_manager.cc
@@ -8,6 +8,7 @@
#include "ui/aura/env.h"
#include "ui/aura/monitor.h"
+#include "ui/aura/root_window.h"
#include "ui/aura/root_window_host.h"
#include "ui/gfx/rect.h"
@@ -44,7 +45,11 @@ Monitor* MonitorManager::CreateMonitorFromSpec(const std::string& spec) {
// static
RootWindow* MonitorManager::CreateRootWindowForPrimaryMonitor() {
MonitorManager* manager = aura::Env::GetInstance()->monitor_manager();
- return manager->CreateRootWindowForMonitor(manager->GetMonitorAt(0));
+ RootWindow* root =
+ manager->CreateRootWindowForMonitor(manager->GetMonitorAt(0));
+ if (use_fullscreen_host_window_)
+ root->ConfineCursorToWindow();
+ return root;
}
MonitorManager::MonitorManager() {

Powered by Google App Engine
This is Rietveld 408576698