Changeset View
Changeset View
Standalone View
Standalone View
backends/kwayland/waylandscreen.cpp
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | |||||
44 | } | 44 | } | ||
45 | 45 | | |||
46 | void WaylandScreen::setOutputs(const QList<WaylandOutput*> outputs) | 46 | void WaylandScreen::setOutputs(const QList<WaylandOutput*> outputs) | ||
47 | { | 47 | { | ||
48 | m_outputCount = outputs.count(); | 48 | m_outputCount = outputs.count(); | ||
49 | QRect r; | 49 | QRect r; | ||
50 | Q_FOREACH (auto o, outputs) { | 50 | Q_FOREACH (auto o, outputs) { | ||
51 | if (o->enabled()) { | 51 | if (o->enabled()) { | ||
52 | r |= QRect(o->outputDevice()->globalPosition(), o->outputDevice()->pixelSize()); | 52 | r |= QRect(o->outputDevice()->globalPosition(), o->outputDevice()->pixelSize() / o->outputDevice()->scale()); | ||
53 | } | 53 | } | ||
54 | } | 54 | } | ||
55 | m_size = r.size(); | 55 | m_size = r.size(); | ||
56 | } | 56 | } | ||
57 | 57 | | |||
58 | void WaylandScreen::updateKScreenScreen(KScreen::ScreenPtr &screen) const | 58 | void WaylandScreen::updateKScreenScreen(KScreen::ScreenPtr &screen) const | ||
59 | { | 59 | { | ||
60 | screen->setMinSize(QSize(0, 0)); | 60 | screen->setMinSize(QSize(0, 0)); | ||
61 | screen->setMaxSize(QSize(64000, 64000)); // 64000^2 should be enough for everyone. | 61 | screen->setMaxSize(QSize(64000, 64000)); // 64000^2 should be enough for everyone. | ||
62 | screen->setCurrentSize(m_size); | 62 | screen->setCurrentSize(m_size); | ||
63 | screen->setMaxActiveOutputsCount(m_outputCount); | 63 | screen->setMaxActiveOutputsCount(m_outputCount); | ||
64 | } | 64 | } | ||
65 | 65 | |