Scaled decorations in QPainter mode
ClosedPublic

Authored by davidedmundson on Oct 26 2017, 6:21 PM.

Details

Summary

Under wayland we support high DPI putting by putting a separation
between the logical co-ordinate system and the resolution of rendered
assets.

I didn't include window decorations in the previous wayland scaling
patchset. They were drawn them at a standard resolution, which is
implicitly scaled up.

This uses the Qt scaling, meaning oxygen and breeze (and others) get
perfect high DPI support with zero client changes.

Like the window scaling this handles any combination of a 2x scaled
decoration being rendered on a 1x screen or vice versa.

CCBUG: 384765

Test Plan

export KWIN_COMPOSE=Q
Had two screens of different scales
It was the right size on both (as before)
Was super-sharp on the fancy screen

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Oct 26 2017, 6:21 PM
Restricted Application added a project: KWin. · View Herald TranscriptOct 26 2017, 6:21 PM
Restricted Application added subscribers: KWin, kwin, plasma-devel. · View Herald Transcript
graesslin added inline comments.
decorations/decorationrenderer.cpp
42

Please don't check for waylandServer being non-null. Use the operationMode instead.

operationmode

Restricted Application edited projects, added Plasma; removed KWin. · View Herald TranscriptOct 26 2017, 7:17 PM
graesslin accepted this revision.Oct 27 2017, 7:00 AM
This revision is now accepted and ready to land.Oct 27 2017, 7:00 AM
This revision was automatically updated to reflect the committed changes.