Chromium Code Reviews| 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..6006c8856b5f9e6e6c81f0d65f8d1e5ea71dee22 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,11 @@ void RemoteWindowTreeHostWin::OnTouchMoved(int32 x, |
| } |
| void RemoteWindowTreeHostWin::OnSetCursorPosAck() { |
| - DCHECK(ignore_mouse_moves_until_set_cursor_ack_); |
| - ignore_mouse_moves_until_set_cursor_ack_ = false; |
| + if (ignore_mouse_moves_until_set_cursor_ack_ > 0) { |
|
sky
2014/09/09 23:34:18
DCHECK?
ananta
2014/09/09 23:39:17
Done.
|
| + ignore_mouse_moves_until_set_cursor_ack_--; |
| + } else { |
| + NOTREACHED() << "Received unexpected SetCursorPos ACK"; |
| + } |
| } |
| ui::RemoteInputMethodPrivateWin* |