@@ -52,18 +52,23 @@ public:
5252
5353 if (m_connectedWindow) {
5454 disconnect(m_connectedWindow.data());
55− m_sizes.takeFirst()->deleteLater();
5655 }
5756
5857 m_connectedWindow = w;
5958
6059 if (w) {
6160 connect(w, &ScreenWindow::heightChanged, this, [this](int height) {
61+ if (height == 0 || height == m_sizes.first()->size.rheight()) {
62+ return;
63+ }
6264 m_sizes.first()->size.rheight() = height;
6365 Q_EMIT availableModesChanged();
6466
6567 });
6668 connect(w, &ScreenWindow::widthChanged, this, [this](int width) {
69+ if (width == 0 || width == m_sizes.first()->size.rwidth()) {
70+ return;
71+ }
6772 m_sizes.first()->size.rwidth() = width;
6873 Q_EMIT availableModesChanged();
6974 });
@@ -162,7 +167,7 @@ MockScreens::MockScreens()
162167 screen->m_active = i == 0;
163168 screen->m_name = QString("Monitor %1").arg(i);
164169 screen->m_position = QPoint(lastPoint.x(), lastPoint.y());
165− screen->m_currentModeIndex = 3;
170+ screen->m_currentModeIndex = 0;
166171 m_mocks.append(screen);
167172
168173 lastPoint.rx() += screen->m_sizes[screen->m_currentModeIndex]->size.width();