Fix multi-monitor support in the screen capturer for Mac.
This feature was broken in r5471. BUG=361919 R=jiayl@webrtc.org Committed: https://code.google.com/p/webrtc/source/detail?r=5937 Review URL: https://webrtc-codereview.appspot.com/12109004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5942 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -59,10 +59,11 @@ struct MacDesktopConfiguration {
|
||||
const MacDisplayConfiguration* FindDisplayConfigurationById(
|
||||
CGDirectDisplayID id);
|
||||
|
||||
// Bounds of the desktop in Density-Independent Pixels (DIPs).
|
||||
// Bounds of the desktop excluding monitors with DPI settings different from
|
||||
// the main monitor. In Density-Independent Pixels (DIPs).
|
||||
DesktopRect bounds;
|
||||
|
||||
// Bounds of the desktop in physical pixels.
|
||||
// Same as bounds, but expressed in physical pixels.
|
||||
DesktopRect pixel_bounds;
|
||||
|
||||
// Scale factor from DIPs to physical pixels.
|
||||
|
@ -134,12 +134,16 @@ MacDesktopConfiguration MacDesktopConfiguration::GetCurrent(Origin origin) {
|
||||
// Add the display to the configuration.
|
||||
desktop_config.displays.push_back(display_config);
|
||||
|
||||
// Update the desktop bounds to account for this display.
|
||||
// Update the desktop bounds to account for this display, unless the current
|
||||
// display uses different DPI settings.
|
||||
if (display_config.dip_to_pixel_scale ==
|
||||
desktop_config.dip_to_pixel_scale) {
|
||||
desktop_config.bounds =
|
||||
JoinRects(desktop_config.bounds, display_config.bounds);
|
||||
desktop_config.pixel_bounds =
|
||||
JoinRects(desktop_config.pixel_bounds, display_config.pixel_bounds);
|
||||
}
|
||||
}
|
||||
|
||||
return desktop_config;
|
||||
}
|
||||
|
Reference in New Issue
Block a user