Changeset View
Changeset View
Standalone View
Standalone View
abstract_output.cpp
Show First 20 Lines • Show All 94 Lines • ▼ Show 20 Line(s) | 85 | { | |||
---|---|---|---|---|---|
95 | } | 95 | } | ||
96 | if (m_waylandOutputDevice) { | 96 | if (m_waylandOutputDevice) { | ||
97 | m_waylandOutputDevice->setScaleF(scale); | 97 | m_waylandOutputDevice->setScaleF(scale); | ||
98 | } | 98 | } | ||
99 | if (m_xdgOutput) { | 99 | if (m_xdgOutput) { | ||
100 | m_xdgOutput->setLogicalSize(pixelSize() / m_scale); | 100 | m_xdgOutput->setLogicalSize(pixelSize() / m_scale); | ||
101 | m_xdgOutput->done(); | 101 | m_xdgOutput->done(); | ||
102 | } | 102 | } | ||
103 | emit modeChanged(); | ||||
103 | } | 104 | } | ||
104 | 105 | | |||
105 | void AbstractOutput::setChanges(KWayland::Server::OutputChangeSet *changes) | 106 | void AbstractOutput::setChanges(KWayland::Server::OutputChangeSet *changes) | ||
106 | { | 107 | { | ||
107 | qCDebug(KWIN_CORE) << "Set changes in AbstractOutput."; | 108 | qCDebug(KWIN_CORE) << "Set changes in AbstractOutput."; | ||
108 | Q_ASSERT(!m_waylandOutputDevice.isNull()); | 109 | Q_ASSERT(!m_waylandOutputDevice.isNull()); | ||
109 | 110 | | |||
110 | if (!changes) { | 111 | if (!changes) { | ||
Show All 16 Lines | 125 | if (changes->positionChanged()) { | |||
127 | // may just work already! | 128 | // may just work already! | ||
128 | } | 129 | } | ||
129 | if (changes->scaleChanged()) { | 130 | if (changes->scaleChanged()) { | ||
130 | qCDebug(KWIN_CORE) << "Setting scale:" << changes->scale(); | 131 | qCDebug(KWIN_CORE) << "Setting scale:" << changes->scale(); | ||
131 | setScale(changes->scaleF()); | 132 | setScale(changes->scaleF()); | ||
132 | } | 133 | } | ||
133 | } | 134 | } | ||
134 | 135 | | |||
136 | void AbstractOutput::setWaylandMode(const QSize &size, int refreshRate) | ||||
137 | { | ||||
138 | if (m_waylandOutput.isNull()) { | ||||
139 | return; | ||||
140 | } | ||||
141 | m_waylandOutput->setCurrentMode(size, refreshRate); | ||||
142 | if (m_xdgOutput) { | ||||
143 | m_xdgOutput->setLogicalSize(pixelSize() / scale()); | ||||
144 | m_xdgOutput->done(); | ||||
145 | } | ||||
146 | } | ||||
147 | | ||||
135 | void AbstractOutput::createXdgOutput() | 148 | void AbstractOutput::createXdgOutput() | ||
136 | { | 149 | { | ||
137 | if (!m_waylandOutput || m_xdgOutput) { | 150 | if (!m_waylandOutput || m_xdgOutput) { | ||
138 | return; | 151 | return; | ||
139 | } | 152 | } | ||
140 | m_xdgOutput = waylandServer()->xdgOutputManager()->createXdgOutput(m_waylandOutput, m_waylandOutput); | 153 | m_xdgOutput = waylandServer()->xdgOutputManager()->createXdgOutput(m_waylandOutput, m_waylandOutput); | ||
141 | } | 154 | } | ||
142 | 155 | | |||
Show All 34 Lines |