Implemented floor control for Windows. This also fixes a bug in the event executor that was causing pointer events to be off by 1px.
BUG=96649
TEST=Manual
Review URL: http://codereview.chromium.org/8114023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105043 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/remoting/host/event_executor_win.cc b/remoting/host/event_executor_win.cc
index ebedf256..7e3d801 100644
--- a/remoting/host/event_executor_win.cc
+++ b/remoting/host/event_executor_win.cc
@@ -110,9 +110,9 @@
input.type = INPUT_MOUSE;
input.mi.time = 0;
SkISize screen_size = capturer_->size_most_recent();
- if ((screen_size.width() > 0) && (screen_size.height() > 0)) {
- input.mi.dx = static_cast<int>((x * 65535) / screen_size.width());
- input.mi.dy = static_cast<int>((y * 65535) / screen_size.height());
+ if ((screen_size.width() > 1) && (screen_size.height() > 1)) {
+ input.mi.dx = static_cast<int>((x * 65535) / (screen_size.width() - 1));
+ input.mi.dy = static_cast<int>((y * 65535) / (screen_size.height() - 1));
input.mi.dwFlags = MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE;
SendInput(1, &input, sizeof(INPUT));
}