diff options
author | Simon Rettberg | 2022-02-23 18:51:37 +0100 |
---|---|---|
committer | Simon Rettberg | 2022-02-23 18:51:37 +0100 |
commit | 51803bb82298196ccee7285911bc9e3b71b6f920 (patch) | |
tree | 71cbe486b6d7ff70a1cdb5fda838ef1459fa5701 /src | |
parent | Webview: Use keyboard & mouse input to track inactivity (diff) | |
download | slxgreeter-51803bb82298196ccee7285911bc9e3b71b6f920.tar.gz slxgreeter-51803bb82298196ccee7285911bc9e3b71b6f920.tar.xz slxgreeter-51803bb82298196ccee7285911bc9e3b71b6f920.zip |
RemoteAccess/RPC: Assume DVI-I-1-1 is evdi output
Diffstat (limited to 'src')
-rw-r--r-- | src/loginrpc.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/loginrpc.cpp b/src/loginrpc.cpp index a4e61fc..24b5b11 100644 --- a/src/loginrpc.cpp +++ b/src/loginrpc.cpp @@ -74,7 +74,7 @@ void LoginRpc::handleCommandV1(const QString &command) QString out = QString::fromLocal8Bit(p.readAll()); QRegularExpression re("^(\\S+)\\s.*?(\\w*connected)", QRegularExpression::MultilineOption); QRegularExpressionMatchIterator it = re.globalMatch(out); - QString virtOut; + QString virtOut, evdiOut; QStringList allOutputs; while (it.hasNext()) { QRegularExpressionMatch m = it.next(); @@ -83,10 +83,17 @@ void LoginRpc::handleCommandV1(const QString &command) || output == QLatin1String("Virtual1") || output == QLatin1String("Virtual-1") || output == QLatin1String("default"))) { virtOut = output; + } else if (output == QLatin1String("DVI-I-1-1")) { + evdiOut = output; } else { allOutputs << output; } } + if (virtOut.isEmpty()) { + virtOut = evdiOut; + } else if (!evdiOut.isEmpty()) { + allOutputs << evdiOut; + } qDebug() << "Virtual output:" << virtOut << "unwanted additional outputs:" << allOutputs; p.kill(); int ret = -1; |