зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
1d0f00a0db
Коммит
8a67034126
|
@ -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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче