Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #33 from giucam/mer-5.4
Set the physical size of the output
  • Loading branch information
giucam committed Sep 7, 2015
2 parents 9c385e1 + 47b8cae commit aa95fa3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/compositor/wayland_wrapper/qwlcompositor.cpp
Expand Up @@ -399,8 +399,15 @@ Qt::ScreenOrientation Compositor::screenOrientation() const

void Compositor::setOutputGeometry(const QRect &geometry)
{
if (m_output_global)
if (m_output_global) {
m_output_global->setGeometry(geometry);

QSizeF p(window()->screen()->physicalSize());
QSizeF s(window()->screen()->size());
qreal w = p.width() * s.width() / geometry.width();
qreal h = p.height() * s.height() / geometry.height();
m_output_global->setPhysicalSize(QSize(w, h));
}
}

QRect Compositor::outputGeometry() const
Expand Down

0 comments on commit aa95fa3

Please sign in to comment.