[platforms/virtual] Set raw physical size of outputs
ClosedPublic

Authored by romangg on Aug 31 2018, 10:57 AM.

Details

Summary

At least one test requires the physical size to be set.

Test Plan

Lock screen screen edges test is passing again. Without the change the corner
offset in the ScreenEdges class is not calculated correctly via the
physicalDpiX() and physicalDpiY() values of an auxilliary QWidget.

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.
romangg created this revision.Aug 31 2018, 10:57 AM
Restricted Application added a project: KWin. · View Herald TranscriptAug 31 2018, 10:57 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
romangg requested review of this revision.Aug 31 2018, 10:57 AM
davidedmundson accepted this revision.Aug 31 2018, 11:10 AM
davidedmundson added a subscriber: davidedmundson.
davidedmundson added inline comments.
plugins/platforms/virtual/virtual_output.cpp
45

This is in mm.

Which gives this virtual screen a DPI of 25.4, it still works but it's a bit unrealistic.

Might be better to just set an arbitrary sensible QRect.

This revision is now accepted and ready to land.Aug 31 2018, 11:10 AM
romangg added inline comments.Aug 31 2018, 11:21 AM
plugins/platforms/virtual/virtual_output.cpp
45

For the tests it does not make a difference, but yea kind of unrealistic. I will push this here as a quick fix, but we should in the future expand this class in general for better tests of (auto-)scaling. With the new structure this should then translate directly to the DRM backend.

This revision was automatically updated to reflect the committed changes.