Add highdpi support for RDP and VNC
Needs ReviewPublic

Authored by volkov on Apr 24 2019, 3:19 PM.


Group Reviewers
KDE Applications

In highdpi mode coordinates are specified in device independent pixels,
and Qt auto-scales everything by devicePixelRatio, i.e. the ratio between
the device independent and device pixel coordinate systems.

Thus for RDP we should pass the size in device pixels to xfreerdp.

For VNC we should avoid auto-scaling, which can be done by setting
devicePixelRatio of the paint device for the painted image, and
the size of the image should be converted to device independent
pixels where it's needed.

Diff Detail

No Linters Available
No Unit Test Coverage
Build Status
Buildable 11691
Build 11709: arc lint + arc unit
volkov requested review of this revision.Apr 24 2019, 3:19 PM
volkov created this revision.
volkov updated this revision to Diff 57055.Apr 26 2019, 4:33 PM


volkov retitled this revision from WIP: Add highdpi support for RDP and VNC to Add highdpi support for RDP and VNC.Apr 26 2019, 4:35 PM
volkov added a reviewer: KDE Applications.
aacid added a subscriber: aacid.Wed, May 1, 9:26 AM

it looks sane to me, but otoh i don't have a hidpi display to test so not really an expert in this field.

Would you mind writing a long-ish comment in the commit (use arc diff --edit --verbatim to reupload the new text to phabricator) for the next person that tries to read the code?

I could test with hidpi screens, but I need to understand what was the problem and how is it fixed.

ngraham added a subscriber: ngraham.Wed, May 1, 6:19 PM

BTW you can test even without a high DPI screen just by using KScreen's scaling or running QT_SCALE_FACTOR=<some real between 1.0 and 2.0> <executable name/path> It will simply be bigger, but any graphical glitches can still be seen.

I'm going to rebase it on D21096. Please, review that change first.

volkov updated this revision to Diff 57810.Thu, May 9, 3:17 PM


volkov edited the summary of this revision. (Show Details)Thu, May 9, 7:23 PM