This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goclient. commit 861315017588e46747f44a7e7bfe1c658def9c39 Author: Mihai Moldovan <ionic@ionic.de> Date: Tue Sep 26 11:35:49 2017 +0200 src/onmainwindow.cpp: fix up main window position check; use QRect.intersects (). --- debian/changelog | 2 ++ src/onmainwindow.cpp | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 54b1a38..4915f32 100644 --- a/debian/changelog +++ b/debian/changelog @@ -196,6 +196,8 @@ x2goclient (4.1.1.0-0x2go1) UNRELEASED; urgency=medium - src/onmainwindow.cpp: try to find a display that can hold the window's position fetched from the sizes settings. Use the default if none could be found. + - src/onmainwindow.cpp: fix up main window position check; use + QRect.intersects (). * x2goclient.spec: - Respect %{optflags} and pass QMAKE_STRIP=: to fix missing debug info issues. diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index ff1c0e9..26fe846 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -1702,11 +1702,11 @@ void ONMainWindow::loadSettings() */ bool placement_found = false; QDesktopWidget *desktop_widget = QApplication::desktop (); - for (size_t i = 0; i < desktop_widget->screenCount (); ++i) { + QRect main_window_geom (mwPos, mwSize); + for (size_t i = 0; i < static_cast<size_t> (desktop_widget->screenCount ()); ++i) { QRect tmp_geom = desktop_widget->availableGeometry (i); - if (((tmp_geom.x () + tmp_geom.width ()) < mwPos.x ()) && - ((tmp_geom.y () + tmp_geom.height ()) < mwPos.y ())) { + if (tmp_geom.intersects (main_window_geom)) { placement_found = true; break; } -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git