From 03fc8a994b1ff3c2e35efe07a187b956b447557d Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 20 Jul 2018 15:26:22 +0200 Subject: [client] Don't activateWindow VNC viewer on open in multiscreen mode --- src/client/vnc/vncwindow.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/client/vnc/vncwindow.cpp b/src/client/vnc/vncwindow.cpp index 4976bbd..f5a9337 100644 --- a/src/client/vnc/vncwindow.cpp +++ b/src/client/vnc/vncwindow.cpp @@ -140,19 +140,21 @@ void VncWindow::open(const QString& host, int port, const QString& passwd, bool _multiScreen = ns > 1; qDebug() << "Spawning at" << best; size = best.size(); + show(); setGeometry(best); - move(best.topLeft()); - //showFullScreen(); - activateWindow(); raise(); + if (!_multiScreen) { + activateWindow(); + } + move(best.topLeft()); } else { + setWindowFlags(Qt::Tool | Qt::WindowMaximizeButtonHint); size = QSize(800, 600); resize(size); showNormal(); } this->repaint(); - this->show(); _vncWorker->setTargetBuffer(_image); _tcpTimeoutTimer = startTimer(10000); -- cgit v1.2.3-55-g7522