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

Side by Side Diff: ui/aura/root_window.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/aura/root_window.h" 5 #include "ui/aura/root_window.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 381
382 if (capture_window_) { 382 if (capture_window_) {
383 // Make all subsequent mouse events and touch go to the capture window. We 383 // Make all subsequent mouse events and touch go to the capture window. We
384 // shouldn't need to send an event here as OnCaptureLost should take care of 384 // shouldn't need to send an event here as OnCaptureLost should take care of
385 // that. 385 // that.
386 if (mouse_moved_handler_ || mouse_button_flags_ != 0) 386 if (mouse_moved_handler_ || mouse_button_flags_ != 0)
387 mouse_moved_handler_ = capture_window_; 387 mouse_moved_handler_ = capture_window_;
388 } else { 388 } else {
389 // When capture is lost, we must reset the event handlers. 389 // When capture is lost, we must reset the event handlers.
390 mouse_moved_handler_ = NULL; 390 mouse_moved_handler_ = NULL;
391
392 host_->UnConfineCursor();
393 } 391 }
394 mouse_pressed_handler_ = NULL; 392 mouse_pressed_handler_ = NULL;
395 } 393 }
396 394
397 void RootWindow::ReleaseCapture(Window* window) { 395 void RootWindow::ReleaseCapture(Window* window) {
398 if (capture_window_ != window) 396 if (capture_window_ != window)
399 return; 397 return;
400 SetCapture(NULL); 398 SetCapture(NULL);
401 } 399 }
402 400
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 void RootWindow::UnlockCompositor() { 868 void RootWindow::UnlockCompositor() {
871 DCHECK(compositor_lock_); 869 DCHECK(compositor_lock_);
872 compositor_lock_ = NULL; 870 compositor_lock_ = NULL;
873 if (draw_on_compositor_unlock_) { 871 if (draw_on_compositor_unlock_) {
874 draw_on_compositor_unlock_ = false; 872 draw_on_compositor_unlock_ = false;
875 ScheduleDraw(); 873 ScheduleDraw();
876 } 874 }
877 } 875 }
878 876
879 } // namespace aura 877 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698