summaryrefslogtreecommitdiffstats
path: root/remoting/host/event_executor_win.cc
diff options
context:
space:
mode:
Diffstat (limited to 'remoting/host/event_executor_win.cc')
-rw-r--r--remoting/host/event_executor_win.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/remoting/host/event_executor_win.cc b/remoting/host/event_executor_win.cc
index e0235ce..e1e57fa 100644
--- a/remoting/host/event_executor_win.cc
+++ b/remoting/host/event_executor_win.cc
@@ -7,6 +7,7 @@
#include <windows.h>
#include "base/keyboard_codes.h"
#include "base/stl_util-inl.h"
+#include "remoting/host/capturer.h"
namespace remoting {
@@ -347,7 +348,8 @@ static base::KeyboardCode WindowsKeyCodeForPosixKeyCode(int keycode) {
}
}
-EventExecutorWin::EventExecutorWin() {
+EventExecutorWin::EventExecutorWin(Capturer* capturer)
+ : EventExecutor(capturer) {
}
EventExecutorWin::~EventExecutorWin() {
@@ -381,6 +383,17 @@ void EventExecutorWin::HandleMouseSetPosition(ChromotingClientMessage* msg) {
int width = msg->mouse_set_position_event().width();
int height = msg->mouse_set_position_event().height();
+ // Get width and height from the capturer if they are missing from the
+ // message.
+ if (width == 0 || height == 0) {
+ width = capturer_->width();
+ height = capturer_->height();
+ }
+ if (width == 0 || height == 0) {
+ return;
+ }
+
+
INPUT input;
input.type = INPUT_MOUSE;
input.mi.time = 0;