[X2Go-Commits] [x2goclient] 02/04: src/onmainwindow.cpp: always enable close button, let it log out from a broker if already authenticated or close the client on click. Fixes: #1209.

git-admin at x2go.org git-admin at x2go.org
Wed Feb 14 22:55:31 CET 2018


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

x2go pushed a commit to branch master
in repository x2goclient.

commit c57ad5d8cd641f789a26278e3d3f112e9db5874e
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Wed Feb 14 22:25:09 2018 +0100

    src/onmainwindow.cpp: always enable close button, let it log out from a broker if already authenticated or close the client on click. Fixes: #1209.
---
 debian/changelog     |  3 +++
 src/onmainwindow.cpp | 13 ++++++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 606b075..09e563e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -72,6 +72,9 @@ x2goclient (4.1.1.1-0x2go1) UNRELEASED; urgency=medium
       unnecessary, since in thinclient mode, for which this feature is
       useful, users will not be able to see the client window while a session
       is executing, due to it running in full screen mode.
+    - src/onmainwindow.cpp: always enable close button, let it log out from a
+      broker if already authenticated or close the client on click. Fixes:
+      #1209.
 
   [ Oleksandr Shneyder ]
   * New upstream version (4.1.1.1):
diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp
index 4b75501..34fd4eb 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -612,10 +612,17 @@ void ONMainWindow::slotShutdownThinClient()
 
 void ONMainWindow::slotCloseButton () {
   /*
-   * Needs a lot more logic here to suspend a session if one
-   * is running and log out of the broker.
+   * Log out of the broker if currently logged in, otherwise
+   * close the client.
    */
-  close ();
+  if (config.brokerAuthenticated) {
+    x2goDebug << "Logging off from broker via close button.";
+    QTimer::singleShot (1, this, SLOT (slotGetBrokerAuth ()));
+  }
+  else {
+    x2goDebug << "Closing client via close button.";
+    close ();
+  }
 }
 
 

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git


More information about the x2go-commits mailing list