Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / webrtc / modules / desktop_capture / mouse_cursor_monitor_win.cc
index d68fe4c..1457bf3 100644 (file)
@@ -28,6 +28,9 @@ class MouseCursorMonitorWin : public MouseCursorMonitor {
   virtual void Capture() OVERRIDE;
 
  private:
+  // Get the rect of the currently selected screen, relative to the primary
+  // display's top-left. If the screen is disabled or disconnected, or any error
+  // happens, an empty rect is returned.
   DesktopRect GetScreenRect();
 
   HWND window_;
@@ -148,11 +151,10 @@ DesktopRect MouseCursorMonitorWin::GetScreenRect() {
   if (!result)
     return DesktopRect();
 
-  return DesktopRect::MakeXYWH(
-      GetSystemMetrics(SM_XVIRTUALSCREEN) + device_mode.dmPosition.x,
-      GetSystemMetrics(SM_YVIRTUALSCREEN) + device_mode.dmPosition.y,
-      device_mode.dmPelsWidth,
-      device_mode.dmPelsHeight);
+  return DesktopRect::MakeXYWH(device_mode.dmPosition.x,
+                               device_mode.dmPosition.y,
+                               device_mode.dmPelsWidth,
+                               device_mode.dmPelsHeight);
 }
 
 MouseCursorMonitor* MouseCursorMonitor::CreateForWindow(