https://bugs.kde.org/show_bug.cgi?id=417310
Bug ID: 417310 Summary: Incorrect resolution with HiDPI scaling on Product: krdc Version: 19.12 Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: uwol...@kde.org Reporter: yyc1...@gmail.com Target Milestone: --- SUMMARY This issue has come up some time ago, got fixed but is appearing again. There does seem to be some changne WRT scaling in the latest Qt5/KF5 since a few other applications also changed (usually for the better). STEPS TO REPRODUCE 1. Enable scaling in systemsettings (e.g. 2) 2. Set rdp screen resolution to be "Current KRDC size" OBSERVED RESULT The RDP view will be half the size of the window instead of the full size as expected. This is not limited to this particular setting. Changing the size to be larger than this cause the scroll bar to appear even though it's not needed. I highly suspect this to be the same for other connection backend as well but I cannot test myself... EXPECTED RESULT At least the size of the remote display and the size of the window should agree, i.e. when the apparent display size on the screen is smaller than the widget size it fits in, there should be no scrollbar. I can see argument for both using the scaled or unscaled resolution for the remote connection so I think it might be good to add an option for that. (This basically depend on whether the remote side is aware of how to deal with HiDPI). This is of course assuming that the backend actually support this. xfreerdp does seem to have related options... Personally I prefer having a high resolution remote and I've tested that the following completely incorrect patch works for my setting. ``` diff --git a/rdp/rdpview.cpp b/rdp/rdpview.cpp index 4adc4cc..925eca0 100644 --- a/rdp/rdpview.cpp +++ b/rdp/rdpview.cpp @@ -183,7 +183,7 @@ bool RdpView::start() if (versionOutput.contains(QLatin1String(" 1.0"))) { qCDebug(KRDC) << "Use FreeRDP 1.0 compatible arguments"; - arguments << QStringLiteral("-g") << QString::number(width) + QLatin1Char('x') + QString::number(height); + arguments << QStringLiteral("-g") << QString::number(width * 2) + QLatin1Char('x') + QString::number(height * 2); arguments << QStringLiteral("-k") << keymapToXfreerdp(m_hostPreferences->keyboardLayout()); @@ -276,8 +276,8 @@ bool RdpView::start() qCDebug(KRDC) << "Use FreeRDP 1.1+ compatible arguments"; arguments << QStringLiteral("-decorations"); - arguments << QStringLiteral("/w:") + QString::number(width); - arguments << QStringLiteral("/h:") + QString::number(height); + arguments << QStringLiteral("/w:") + QString::number(width * 2); + arguments << QStringLiteral("/h:") + QString::number(height * 2); arguments << QStringLiteral("/kbd:") + keymapToXfreerdp(m_hostPreferences->keyboardLayout()); ``` SOFTWARE/OS VERSIONS Linux/KDE Plasma: ArchLinux latest as of 2/8/2020 (testing enabled) (available in About System) KDE Plasma Version: 5.17.5 KDE Frameworks Version: 5.66.0 Qt Version: 5.14.1 ADDITIONAL INFORMATION -- You are receiving this mail because: You are watching all bug changes.