Report modes unscaled and geometry scaled
AbandonedPublic

Authored by dvratil on Dec 21 2017, 3:29 PM.

Details

Summary

Report sizes in Output's modes unscaled - the modes don't change with scaling after
all. On the other hand report Output::geometry() scaled. This maps nicely to how
Qt and XRandR represents this and it also simplifies the code a lot since we actually
reduce the number of places where we need to divide or multiply by scaling to get
the desired dimensions.

Diff Detail

Repository
R110 KScreen Library
Lint
Lint Skipped
Unit
Unit Tests Skipped
dvratil created this revision.Dec 21 2017, 3:29 PM
Restricted Application added a project: Plasma. · View Herald TranscriptDec 21 2017, 3:29 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
dvratil requested review of this revision.Dec 21 2017, 3:29 PM
davidedmundson requested changes to this revision.Dec 21 2017, 5:02 PM

It currently maps to wl_ouptut. It maps to how Qt does it's DPI painting.

Report sizes in Output's modes unscaled - the modes don't change with scaling after

all

I agree.
Yet, your patch does the opposite. It literally scales the mode.

Same for geometry being "unscaled"


Lets avoid the those terms. They're confusing.

Geometry should be in logical size.
Mode should be in device size.

We do have an issue that X and wayland require everything backwards

On wayland (which is important to test please! ) everything is in logical space. If I have a 2000x2000px montior @2x, the monitor to the right of it has X=1000
For X we have no knowledge, we're always in device space, so the second monitor has X=2000

We have this difference for positioning windows too.

The only way to keep this sane is to think in terms of logical and device pixels, and make sure abstraction happens in the right place.

This revision now requires changes to proceed.Dec 21 2017, 5:02 PM
dvratil abandoned this revision.Feb 25 2020, 4:36 PM