diff options
-rw-r--r-- | src/server/mainwindow/mainwindow.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp index 7b95982..e6efb1c 100644 --- a/src/server/mainwindow/mainwindow.cpp +++ b/src/server/mainwindow/mainwindow.cpp @@ -563,6 +563,7 @@ AspectStatus checkAspectRatio(const QSize& frameSize, const QSize& gridSize) { return GRID_OK; } + /***************************************************************************//** * Resize event. * @param e @@ -588,6 +589,15 @@ void MainWindow::resizeEvent(QResizeEvent* e) this->_tilesX = newGridSize.width(); this->_tilesY = newGridSize.height(); + /* Bring back frame that are now out of the screen */ + for (auto it = _clientFrames.begin(); it != _clientFrames.end(); ++it) { + const QPoint gp = (*it)->getGridPosition(); + if ( gp.x() > _tilesX || gp.y() > _tilesY ) { + qDebug() << "bring frame back"; + placeFrameInFreeSlot(*it, (*it)->getCurrentPosition()); + } + } + /* Resize all connection windows */ for (QList<ConnectionFrame*>::iterator it = _clientFrames.begin(); it != _clientFrames.end(); ++it) |