summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2022-02-23 18:51:37 +0100
committerSimon Rettberg2022-02-23 18:51:37 +0100
commit51803bb82298196ccee7285911bc9e3b71b6f920 (patch)
tree71cbe486b6d7ff70a1cdb5fda838ef1459fa5701
parentWebview: Use keyboard & mouse input to track inactivity (diff)
downloadslxgreeter-51803bb82298196ccee7285911bc9e3b71b6f920.tar.gz
slxgreeter-51803bb82298196ccee7285911bc9e3b71b6f920.tar.xz
slxgreeter-51803bb82298196ccee7285911bc9e3b71b6f920.zip
RemoteAccess/RPC: Assume DVI-I-1-1 is evdi output
-rw-r--r--src/loginrpc.cpp9
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;