Bug 1047743 - Screen sharing with multiple screens is broken (Mac only). r=jesup

* * *
Bug 1047743 - interdiff to not impact other platforms
This commit is contained in:
Matthew A. Miller 2014-08-27 10:58:14 -06:00
Родитель 1d0f00a0db
Коммит 8a67034126
4 изменённых файлов: 13 добавлений и 7 удалений

Просмотреть файл

@ -36,10 +36,12 @@ void DesktopDeviceInfoMac::MultiMonitorScreenshare()
{
DesktopDisplayDevice *pDesktopDeviceInfo = new DesktopDisplayDevice;
if (pDesktopDeviceInfo) {
pDesktopDeviceInfo->setScreenId(0);
pDesktopDeviceInfo->setScreenId(CGMainDisplayID());
pDesktopDeviceInfo->setDeviceName("Primary Monitor");
pDesktopDeviceInfo->setUniqueIdName("\\screen\\monitor#1");
char idStr[64];
snprintf(idStr, sizeof(idStr), "%ld", pDesktopDeviceInfo->getScreenId());
pDesktopDeviceInfo->setUniqueIdName(idStr);
desktop_display_list_[pDesktopDeviceInfo->getScreenId()] = pDesktopDeviceInfo;
}
}

Просмотреть файл

@ -36,10 +36,12 @@ void DesktopDeviceInfoWin::MultiMonitorScreenshare()
{
DesktopDisplayDevice *pDesktopDeviceInfo = new DesktopDisplayDevice;
if (pDesktopDeviceInfo) {
pDesktopDeviceInfo->setScreenId(0);
pDesktopDeviceInfo->setScreenId(webrtc::kFullDesktopScreenId);
pDesktopDeviceInfo->setDeviceName("Primary Monitor");
pDesktopDeviceInfo->setUniqueIdName("\\screen\\monitor#1");
char idStr[64];
_snprintf_s(idStr, sizeof(idStr), sizeof(idStr) - 1, "%ld", pDesktopDeviceInfo->getScreenId());
pDesktopDeviceInfo->setUniqueIdName(idStr);
desktop_display_list_[pDesktopDeviceInfo->getScreenId()] = pDesktopDeviceInfo;
}
}

Просмотреть файл

@ -35,10 +35,12 @@ void DesktopDeviceInfoX11::MultiMonitorScreenshare()
{
DesktopDisplayDevice *pDesktopDeviceInfo = new DesktopDisplayDevice;
if (pDesktopDeviceInfo) {
pDesktopDeviceInfo->setScreenId(0);
pDesktopDeviceInfo->setScreenId(webrtc::kFullDesktopScreenId);
pDesktopDeviceInfo->setDeviceName("Primary Monitor");
pDesktopDeviceInfo->setUniqueIdName("\\screen\\monitor#1");
char idStr[64];
snprintf(idStr, sizeof(idStr), "%ld", idStr);
pDesktopDeviceInfo->setUniqueIdName(idStr);
desktop_display_list_[pDesktopDeviceInfo->getScreenId()] = pDesktopDeviceInfo;
}
}

Просмотреть файл

@ -382,7 +382,7 @@ int32_t DesktopCaptureImpl::Init(const char* uniqueId,
return -1;
}
ScreenId screenid = webrtc::kFullDesktopScreenId;
ScreenId screenid = atoi(uniqueId);
pScreenCapturer->SelectScreen(screenid);
pScreenCapturer->SetMouseShapeObserver(this);