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

Unified Diff: remoting/host/event_executor_win.cc

Issue 9968071: Ensure display hardware is powered up during Chromoting sessions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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/capturer_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/event_executor_win.cc
diff --git a/remoting/host/event_executor_win.cc b/remoting/host/event_executor_win.cc
index 07416c29dad284483aeefb92650d531855760e16..035ae5fbec3d51f73bf02225a44d96c83c57cc2f 100644
--- a/remoting/host/event_executor_win.cc
+++ b/remoting/host/event_executor_win.cc
@@ -94,10 +94,12 @@ uint16_t UsbKeycodeToWinScancode(uint32_t usb_keycode) {
}
void EventExecutorWin::HandleKey(const KeyEvent& event) {
- int key = event.keycode();
- bool down = event.pressed();
+ // Reset the system idle suspend timeout.
+ SetThreadExecutionState(ES_SYSTEM_REQUIRED);
// Calculate scan code from key event.
+ int key = event.keycode();
+ bool down = event.pressed();
int scancode = INVALID_KEYCODE;
if (event.has_usb_keycode() && event.usb_keycode() != 0) {
scancode = UsbKeycodeToWinScancode(event.usb_keycode());
@@ -138,6 +140,9 @@ void EventExecutorWin::HandleKey(const KeyEvent& event) {
}
void EventExecutorWin::HandleMouse(const MouseEvent& event) {
+ // Reset the system idle suspend timeout.
+ SetThreadExecutionState(ES_SYSTEM_REQUIRED);
+
// TODO(garykac) Collapse mouse (x,y) and button events into a single
// input event when possible.
if (event.has_x() && event.has_y()) {
« no previous file with comments | « remoting/host/capturer_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698