Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Add Wayland support

krdc can now connect to RDP on Wayland session.

The remote window is not embedded in krdc yet
but this is better than not connecting at all.

BUG: 377911
Differential Revision: https://phabricator.kde.org/D18909
parent 8b0d28aa
......@@ -7,7 +7,7 @@ set (KDE_APPLICATIONS_VERSION_MICRO "70")
set (KDE_APPLICATIONS_VERSION "${KDE_APPLICATIONS_VERSION_MAJOR}.${KDE_APPLICATIONS_VERSION_MINOR}.${KDE_APPLICATIONS_VERSION_MICRO}")
set (KF_MIN_VERSION "5.18.0")
set (KF_MIN_VERSION "5.25.0")
find_package(ECM ${KF_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH})
......@@ -31,6 +31,7 @@ find_package(KF5 ${KF_MIN_VERSION} REQUIRED COMPONENTS
Completion
Wallet
WidgetsAddons
WindowSystem
NotifyConfig
I18n
)
......
......@@ -27,6 +27,7 @@ if(HAVE_XFREERDP)
Qt5::Gui
KF5::ConfigCore
KF5::CoreAddons
KF5::WindowSystem
KF5::XmlGui
krdccore
)
......
......@@ -31,6 +31,7 @@
#include <KMessageBox>
#include <KPasswordDialog>
#include <KShell>
#include <KWindowSystem>
#include <QWindow>
#include <QEvent>
......@@ -362,7 +363,12 @@ bool RdpView::start()
connect(m_process, SIGNAL(finished(int,QProcess::ExitStatus)), SLOT(connectionClosed()));
connect(m_process, SIGNAL(started()), SLOT(connectionOpened()));
m_process->start(QStringLiteral("xfreerdp"), arguments);
if (KWindowSystem::platform() == KWindowSystem::Platform::Wayland) {
m_process->start(QStringLiteral("wlfreerdp"), arguments);
}
else {
m_process->start(QStringLiteral("xfreerdp"), arguments);
}
return true;
}
......@@ -429,7 +435,16 @@ void RdpView::processError(QProcess::ProcessError error)
if (m_status == Connecting) {
if (error == QProcess::FailedToStart) {
connectionError(i18n("Could not start \"xfreerdp\"; make sure xfreerdp is properly installed."),
QString executable;
switch (KWindowSystem::platform()) {
case KWindowSystem::Platform::Wayland:
executable = QStringLiteral("wlfreerdp");
break;
case KWindowSystem::Platform::X11:
case KWindowSystem::Platform::Unknown:
executable = QStringLiteral("xfreerdp");
}
connectionError(i18n("Could not start \"%1\"; make sure %1 is properly installed.", executable),
i18n("RDP Failure"));
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment