Changeset View
Changeset View
Standalone View
Standalone View
abstract_output.cpp
Show First 20 Lines • Show All 126 Lines • ▼ Show 20 Line(s) | 124 | if (changes->positionChanged()) { | |||
---|---|---|---|---|---|
127 | // may just work already! | 127 | // may just work already! | ||
128 | } | 128 | } | ||
129 | if (changes->scaleChanged()) { | 129 | if (changes->scaleChanged()) { | ||
130 | qCDebug(KWIN_CORE) << "Setting scale:" << changes->scale(); | 130 | qCDebug(KWIN_CORE) << "Setting scale:" << changes->scale(); | ||
131 | setScale(changes->scaleF()); | 131 | setScale(changes->scaleF()); | ||
132 | } | 132 | } | ||
133 | } | 133 | } | ||
134 | 134 | | |||
135 | void AbstractOutput::setEnabled(bool enable) | ||||
136 | { | ||||
137 | if (enable == isEnabled()) { | ||||
138 | return; | ||||
139 | } | ||||
140 | if (enable) { | ||||
141 | updateDpms(KWayland::Server::OutputInterface::DpmsMode::On); | ||||
142 | initWaylandOutput(); | ||||
143 | } else { | ||||
144 | updateDpms(KWayland::Server::OutputInterface::DpmsMode::Off); | ||||
145 | delete waylandOutput().data(); | ||||
146 | } | ||||
147 | waylandOutputDevice()->setEnabled(enable ? KWayland::Server::OutputDeviceInterface::Enablement::Enabled : | ||||
148 | KWayland::Server::OutputDeviceInterface::Enablement::Disabled); | ||||
149 | } | ||||
150 | | ||||
135 | void AbstractOutput::setWaylandMode(const QSize &size, int refreshRate) | 151 | void AbstractOutput::setWaylandMode(const QSize &size, int refreshRate) | ||
136 | { | 152 | { | ||
137 | if (m_waylandOutput.isNull()) { | 153 | if (m_waylandOutput.isNull()) { | ||
138 | return; | 154 | return; | ||
139 | } | 155 | } | ||
140 | m_waylandOutput->setCurrentMode(size, refreshRate); | 156 | m_waylandOutput->setCurrentMode(size, refreshRate); | ||
141 | if (m_xdgOutput) { | 157 | if (m_xdgOutput) { | ||
142 | m_xdgOutput->setLogicalSize(pixelSize() / scale()); | 158 | m_xdgOutput->setLogicalSize(pixelSize() / scale()); | ||
▲ Show 20 Lines • Show All 88 Lines • Show Last 20 Lines |