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

Unified Diff: ui/aura/remote_window_tree_host_win.cc

Issue 560633002: Ensure that mouse lock works correctly on Chrome ASH in Windows 8. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build errors Created 6 years, 3 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
« no previous file with comments | « ui/aura/remote_window_tree_host_win.h ('k') | win8/metro_driver/chrome_app_view_ash.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/remote_window_tree_host_win.cc
diff --git a/ui/aura/remote_window_tree_host_win.cc b/ui/aura/remote_window_tree_host_win.cc
index 14c9bf6fe6cfa77813edeb5ba1900e1fbdf25077..f939ccbf75dbc2eaeafb895126b08b18b864fdd1 100644
--- a/ui/aura/remote_window_tree_host_win.cc
+++ b/ui/aura/remote_window_tree_host_win.cc
@@ -93,7 +93,7 @@ RemoteWindowTreeHostWin* RemoteWindowTreeHostWin::Instance() {
RemoteWindowTreeHostWin::RemoteWindowTreeHostWin()
: remote_window_(NULL),
host_(NULL),
- ignore_mouse_moves_until_set_cursor_ack_(false),
+ ignore_mouse_moves_until_set_cursor_ack_(0),
event_flags_(0),
window_size_(aura::WindowTreeHost::GetNativeScreenSize()) {
CHECK(!g_instance);
@@ -262,7 +262,7 @@ void RemoteWindowTreeHostWin::MoveCursorToNative(const gfx::Point& location) {
// this we invoke the SetCursor API in the viewer process and ignore
// mouse messages until we received an ACK from the viewer indicating that
// the SetCursor operation completed.
- ignore_mouse_moves_until_set_cursor_ack_ = true;
+ ignore_mouse_moves_until_set_cursor_ack_++;
VLOG(1) << "In MoveCursorTo. Sending IPC";
host_->Send(new MetroViewerHostMsg_SetCursorPos(location.x(), location.y()));
}
@@ -430,8 +430,8 @@ void RemoteWindowTreeHostWin::OnTouchMoved(int32 x,
}
void RemoteWindowTreeHostWin::OnSetCursorPosAck() {
- DCHECK(ignore_mouse_moves_until_set_cursor_ack_);
- ignore_mouse_moves_until_set_cursor_ack_ = false;
+ DCHECK_GT(ignore_mouse_moves_until_set_cursor_ack_, 0);
+ ignore_mouse_moves_until_set_cursor_ack_--;
}
ui::RemoteInputMethodPrivateWin*
« no previous file with comments | « ui/aura/remote_window_tree_host_win.h ('k') | win8/metro_driver/chrome_app_view_ash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698