Changeset View
Changeset View
Standalone View
Standalone View
src/setconfigoperation.cpp
Show First 20 Lines • Show All 135 Lines • ▼ Show 20 Line(s) | |||||
136 | void SetConfigOperationPrivate::normalizeOutputPositions() | 136 | void SetConfigOperationPrivate::normalizeOutputPositions() | ||
137 | { | 137 | { | ||
138 | if (!config) { | 138 | if (!config) { | ||
139 | return; | 139 | return; | ||
140 | } | 140 | } | ||
141 | int offsetX = INT_MAX; | 141 | int offsetX = INT_MAX; | ||
142 | int offsetY = INT_MAX; | 142 | int offsetY = INT_MAX; | ||
143 | Q_FOREACH (const KScreen::OutputPtr &output, config->outputs()) { | 143 | Q_FOREACH (const KScreen::OutputPtr &output, config->outputs()) { | ||
144 | if (!output->isConnected() || !output->isEnabled()) { | 144 | if (!output->isPositionable()) { | ||
145 | continue; | 145 | continue; | ||
146 | } | 146 | } | ||
147 | offsetX = qMin(output->pos().x(), offsetX); | 147 | offsetX = qMin(output->pos().x(), offsetX); | ||
148 | offsetY = qMin(output->pos().y(), offsetY); | 148 | offsetY = qMin(output->pos().y(), offsetY); | ||
149 | } | 149 | } | ||
150 | 150 | | |||
151 | if (!offsetX && !offsetY) { | 151 | if (!offsetX && !offsetY) { | ||
152 | return; | 152 | return; | ||
Show All 13 Lines |