Changeset View
Changeset View
Standalone View
Standalone View
kcm/config_handler.cpp
Show First 20 Lines • Show All 114 Lines • ▼ Show 20 Line(s) | 110 | for (const auto &initialOutput : m_initialConfig->outputs()) { | |||
---|---|---|---|---|---|
115 | if (output->isEnabled() != initialOutput->isEnabled()) { | 115 | if (output->isEnabled() != initialOutput->isEnabled()) { | ||
116 | needsSave = true; | 116 | needsSave = true; | ||
117 | } | 117 | } | ||
118 | if (output->isEnabled()) { | 118 | if (output->isEnabled()) { | ||
119 | needsSave |= output->currentModeId() != | 119 | needsSave |= output->currentModeId() != | ||
120 | initialOutput->currentModeId() | 120 | initialOutput->currentModeId() | ||
121 | || output->pos() != initialOutput->pos() | 121 | || output->pos() != initialOutput->pos() | ||
122 | || output->scale() != initialOutput->scale() | 122 | || output->scale() != initialOutput->scale() | ||
123 | || output->rotation() != initialOutput->rotation(); | 123 | || output->rotation() != initialOutput->rotation() | ||
124 | || output->replicationSource() != initialOutput->replicationSource(); | ||||
124 | } | 125 | } | ||
125 | if (needsSave) { | 126 | if (needsSave) { | ||
126 | Q_EMIT needsSaveChecked(true); | 127 | Q_EMIT needsSaveChecked(true); | ||
127 | return; | 128 | return; | ||
128 | } | 129 | } | ||
129 | break; | 130 | break; | ||
130 | } | 131 | } | ||
131 | } | 132 | } | ||
132 | Q_EMIT needsSaveChecked(false); | 133 | Q_EMIT needsSaveChecked(false); | ||
133 | } | 134 | } | ||
134 | 135 | | |||
135 | QSize ConfigHandler::screenSize() const | 136 | QSize ConfigHandler::screenSize() const | ||
136 | { | 137 | { | ||
137 | int width = 0, height = 0; | 138 | int width = 0, height = 0; | ||
138 | QSize size; | 139 | QSize size; | ||
139 | 140 | | |||
140 | for (const auto &output : m_config->connectedOutputs()) { | 141 | for (const auto &output : m_config->connectedOutputs()) { | ||
141 | if (!output->isEnabled()) { | 142 | if (!output->isPositionable()) { | ||
142 | continue; | 143 | continue; | ||
143 | } | 144 | } | ||
144 | const int outputRight = output->geometry().right(); | 145 | const int outputRight = output->geometry().right(); | ||
145 | const int outputBottom = output->geometry().bottom(); | 146 | const int outputBottom = output->geometry().bottom(); | ||
146 | 147 | | |||
147 | if (outputRight > width) { | 148 | if (outputRight > width) { | ||
148 | width = outputRight; | 149 | width = outputRight; | ||
149 | } | 150 | } | ||
▲ Show 20 Lines • Show All 114 Lines • Show Last 20 Lines |