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

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: 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..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*
« 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