42 lines
1.9 KiB
Diff
42 lines
1.9 KiB
Diff
|
diff --git a/src/remotedesktop.cpp b/src/remotedesktop.cpp
|
||
|
index 02a32a7..6b9b687 100644
|
||
|
--- a/src/remotedesktop.cpp
|
||
|
+++ b/src/remotedesktop.cpp
|
||
|
@@ -22,6 +22,8 @@
|
||
|
#include <QDBusReply>
|
||
|
#include <QGuiApplication>
|
||
|
#include <QRegion>
|
||
|
+#include <KSharedConfig>
|
||
|
+#include <KConfigGroup>
|
||
|
#include <QScreen>
|
||
|
|
||
|
using namespace Qt::StringLiterals;
|
||
|
@@ -178,14 +180,19 @@ uint RemoteDesktopPortal::Start(const QDBusObjectPath &handle,
|
||
|
notification->setIconName(QStringLiteral("krfb"));
|
||
|
notification->sendEvent();
|
||
|
} else {
|
||
|
- QScopedPointer<RemoteDesktopDialog, QScopedPointerDeleteLater> remoteDesktopDialog(
|
||
|
- new RemoteDesktopDialog(app_id, session->deviceTypes(), session->screenSharingEnabled(), session->persistMode()));
|
||
|
- Utils::setParentWindow(remoteDesktopDialog->windowHandle(), parent_window);
|
||
|
- Request::makeClosableDialogRequest(handle, remoteDesktopDialog.get());
|
||
|
- connect(session, &Session::closed, remoteDesktopDialog.data(), &RemoteDesktopDialog::reject);
|
||
|
-
|
||
|
- if (!remoteDesktopDialog->exec()) {
|
||
|
- return 1;
|
||
|
+ auto cfg = KSharedConfig::openConfig(QStringLiteral("plasmaremotedesktoprc"));
|
||
|
+ const auto unattendedAccess = cfg->group("Sharing").readEntry("Unattended", false);
|
||
|
+ if (!unattendedAccess)
|
||
|
+ {
|
||
|
+ QScopedPointer<RemoteDesktopDialog, QScopedPointerDeleteLater> remoteDesktopDialog(
|
||
|
+ new RemoteDesktopDialog(app_id, session->deviceTypes(), session->screenSharingEnabled(), session->persistMode()));
|
||
|
+ Utils::setParentWindow(remoteDesktopDialog->windowHandle(), parent_window);
|
||
|
+ Request::makeClosableDialogRequest(handle, remoteDesktopDialog.get());
|
||
|
+ connect(session, &Session::closed, remoteDesktopDialog.data(), &RemoteDesktopDialog::reject);
|
||
|
+
|
||
|
+ if (!remoteDesktopDialog->exec()) {
|
||
|
+ return 1;
|
||
|
+ }
|
||
|
}
|
||
|
}
|
||
|
|