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

Unified Diff: remoting/host/event_executor_win.cc

Issue 3229007: Chromoting: Get screen size locally if it wasn't given in the mouse message.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 | « remoting/host/event_executor_win.h ('k') | remoting/host/mock_objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/event_executor_win.cc
===================================================================
--- remoting/host/event_executor_win.cc (revision 57860)
+++ remoting/host/event_executor_win.cc (working copy)
@@ -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 @@
}
}
-EventExecutorWin::EventExecutorWin() {
+EventExecutorWin::EventExecutorWin(Capturer* capturer)
+ : EventExecutor(capturer) {
}
EventExecutorWin::~EventExecutorWin() {
@@ -381,6 +383,17 @@
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;
« no previous file with comments | « remoting/host/event_executor_win.h ('k') | remoting/host/mock_objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698