changeset 30641:f3a766367bff

maint: Merge stable to default.
author Markus Mützel <markus.muetzel@gmx.de>
date Fri, 14 Jan 2022 08:19:22 +0100
parents 7961eb9cdc18 (current diff) d162766886ce (diff)
children 805c443ebf18
files .github/workflows/make.yaml
diffstat 3 files changed, 28 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/.github/workflows/codeql-analysis.yaml	Thu Jan 13 07:28:48 2022 -0800
+++ b/.github/workflows/codeql-analysis.yaml	Fri Jan 14 08:19:22 2022 +0100
@@ -110,6 +110,7 @@
           # The third block is for additional dependencies needed when building from a repository checkout.
           install: >-
             base-devel
+            ${{ matrix.target-prefix }}-autotools
             ${{ matrix.target-prefix }}-toolchain
             ${{ matrix.target-prefix }}-lapack
             ${{ matrix.target-prefix }}-openblas
--- a/.github/workflows/make.yaml	Thu Jan 13 07:28:48 2022 -0800
+++ b/.github/workflows/make.yaml	Fri Jan 14 08:19:22 2022 +0100
@@ -361,9 +361,10 @@
           # The first block is for mandatory dependencies.
           # The second block is for optional dependencies needed when building from a release tarball.
           # The third block is for additional dependencies needed when building from a repository checkout.
-          # The fourth block is for additional run-time dependencies that aren't needed to build (to run test suite).
+          # The fourth block is for additional run-time dependencies (to run test suite) that aren't needed to build.
           install: >-
             base-devel
+            ${{ matrix.target-prefix }}-autotools
             ${{ matrix.target-prefix }}-toolchain
             ${{ matrix.target-prefix }}-lapack
             ${{ matrix.target-prefix }}-openblas
--- a/libgui/src/main-window.cc	Thu Jan 13 07:28:48 2022 -0800
+++ b/libgui/src/main-window.cc	Fri Jan 14 08:19:22 2022 +0100
@@ -44,6 +44,7 @@
 #include <QMenu>
 #include <QMenuBar>
 #include <QMessageBox>
+#include <QScreen>
 #include <QStyle>
 #include <QStyleFactory>
 #include <QTextBrowser>
@@ -51,6 +52,7 @@
 #include <QThread>
 #include <QTimer>
 #include <QToolBar>
+#include <QWindow>
 
 // QTerminal includes
 #include "QTerminal.h"
@@ -1543,7 +1545,29 @@
 
     if (isMaximized())
       {
-        setGeometry( QApplication::desktop ()->availableGeometry (this));
+        // If the window state is restored to maximized layout, the
+        // horizontal layout is not preserved. This cann be avoided by
+        // setting the geometry to the max. available geometry. However, on
+        // X11, the available geometry (excluding task bar etc.) is equal to
+        // the total geometry leading to a full screen mode without window
+        // decorations. This in turn can be avoided by reducing the max.
+        // size by a few pixels.
+
+        QScreen *s = windowHandle ()->screen ();  // Get current screen
+        QRect av_geom = s->availableGeometry ();  // Get available and total
+        QRect geom = s->geometry ();              // screen geometry
+
+        QList<QScreen *> screen_list = QGuiApplication::screens ();
+        if ((screen_list.length () > 1) && (av_geom == geom))
+          {
+            // If we have more than one monitor and available and total
+            // geometry are the same, reduce this too large geometry
+            QRect new_geom (av_geom.x () + 1, av_geom.y () + 1,
+                            av_geom.width ()-2, av_geom.height ()-2);
+            setGeometry (new_geom);
+          }
+        else
+          setGeometry (av_geom);  // Set (correct) available geometry
       }
 
     if (! restoreState (settings->value (mw_state).toByteArray ()))