Add physicalSize to the Screens API
ClosedPublic

Authored by graesslin on Oct 17 2017, 4:47 PM.

Details

Summary

Allows to share the implementation in a better way and is a requirement
to get the Screen implementation in the QPA plugin to be based on
KWin::Screens instead of KWayland::Output.

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.
graesslin created this revision.Oct 17 2017, 4:47 PM
Restricted Application added a project: KWin. · View Herald TranscriptOct 17 2017, 4:47 PM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
mart accepted this revision.Oct 17 2017, 5:46 PM
This revision is now accepted and ready to land.Oct 17 2017, 5:46 PM
This revision was automatically updated to reflect the committed changes.
bshah added a subscriber: bshah.Oct 23 2017, 4:19 AM
bshah added inline comments.
plugins/platforms/hwcomposer/hwcomposer_backend.cpp
197

This breaks the build.. will fix it however.

/workspace/build/plugins/platforms/hwcomposer/hwcomposer_backend.cpp: In function ‘KWayland::Server::OutputInterface* KWin::createOutput(hwc_composer_device_1_t*)’:
/workspace/build/plugins/platforms/hwcomposer/hwcomposer_backend.cpp:197:10: error: ‘m_physicalSize’ was not declared in this scope
          m_physicalSize = QSizeF(qreal(pixel.width() * 1000) / qreal(attr_values[2]) * factor,
bshah added a comment.Oct 23 2017, 4:54 AM

This breaks the build.. will fix it however.

Tricky, the method using m_physicalSize is static method, would it cause any issue if I make m_physicalSize also static?

In D8344#158553, @bshah wrote:

This breaks the build.. will fix it however.

Tricky, the method using m_physicalSize is static method, would it cause any issue if I make m_physicalSize also static?

Maybe there is no need to have that method static?

Sorry about the build failure...

bshah added a comment.Oct 23 2017, 5:39 AM

Maybe there is no need to have that method static?

Sorry about the build failure...

Yeah, going by that theory, will put patch in phab in moment.