[X2Go-Commits] [x2goclient] 02/02: src/onmainwindow.cpp: try to workaround window placement if settings contain a (newly) invalid position (e.g., a position that refers to a disconnected display.)

git-admin at x2go.org git-admin at x2go.org
Fri Sep 22 20:10:55 CEST 2017


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2goclient.

commit fa5c8a29f018cb7167f75c5c0781501a6858c9a7
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Fri Sep 22 20:10:05 2017 +0200

    src/onmainwindow.cpp: try to workaround window placement if settings contain a (newly) invalid position (e.g., a position that refers to a disconnected display.)
---
 debian/changelog     | 3 +++
 src/onmainwindow.cpp | 7 +++++++
 2 files changed, 10 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 573b037..47d7fdb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -190,6 +190,9 @@ x2goclient (4.1.1.0-0x2go1) UNRELEASED; urgency=medium
       problematic.
     - src/sessionexplorer.cpp: open the correct tab when editing a session
       from the exports menu.
+    - src/onmainwindow.cpp: try to workaround window placement if settings
+      contain a (newly) invalid position (e.g., a position that refers to a
+      disconnected display.)
   * 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 0cb4f2c..56f70db 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -8220,6 +8220,13 @@ void ONMainWindow::slotResize()
     {
         resize ( mwSize );
         move ( mwPos );
+
+        /*
+         * Make window position a hint, workaround for
+         * buggy placements on screen coordinates out of range.
+         */
+        setAttribute (Qt::WA_Moved, false);
+
         show();
     }
     else

--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git


More information about the x2go-commits mailing list