1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Merge pull request #3505

Colomban Wendling (1):
      fix(x11grab): try and use the current display
This commit is contained in:
sudden6 2016-07-16 23:50:12 +02:00
commit b5c8c60d81
No known key found for this signature in database
GPG Key ID: 279509B499E032B9

View File

@ -318,7 +318,17 @@ QVector<QPair<QString, QString>> CameraDevice::getDeviceList()
if (idesktopFormat)
{
if (idesktopFormat->name == QString("x11grab"))
devices.push_back(QPair<QString,QString>{"x11grab#:0", QObject::tr("Desktop", "Desktop as a camera input for screen sharing")});
{
QString dev = "x11grab#";
QByteArray display = qgetenv("DISPLAY");
if (display.isNull())
dev += ":0";
else
dev += display.constData();
devices.push_back(QPair<QString,QString>{dev, QObject::tr("Desktop", "Desktop as a camera input for screen sharing")});
}
if (idesktopFormat->name == QString("gdigrab"))
devices.push_back(QPair<QString,QString>{"gdigrab#desktop", QObject::tr("Desktop", "Desktop as a camera input for screen sharing")});
}