Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package octave for openSUSE:Factory checked 
in at 2022-03-10 22:44:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/octave (Old)
 and      /work/SRC/openSUSE:Factory/.octave.new.2349 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "octave"

Thu Mar 10 22:44:59 2022 rev:74 rq:960590 version:6.4.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/octave/octave.changes    2021-11-22 
23:05:33.537655220 +0100
+++ /work/SRC/openSUSE:Factory/.octave.new.2349/octave.changes  2022-03-11 
11:48:18.362808419 +0100
@@ -1,0 +2,8 @@
+Tue Mar  8 13:32:58 UTC 2022 - Atri Bhattacharya <badshah...@gmail.com>
+
+- Add octave-fullscreen-with-multiple-monitors.patch -- fix
+  maximized start on systems with two monitors
+  (https://savannah.gnu.org/bugs/?61172); patch taken from
+  upstream commit and re-based for version 6.4.0.
+
+-------------------------------------------------------------------

New:
----
  octave-fullscreen-with-multiple-monitors.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ octave.spec ++++++
--- /var/tmp/diff_new_pack.D5uIk2/_old  2022-03-11 11:48:18.914807871 +0100
+++ /var/tmp/diff_new_pack.D5uIk2/_new  2022-03-11 11:48:18.918807867 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package octave
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -67,6 +67,8 @@
 Patch2:         0001-Use-reentrant-libqhull_r.patch
 # PATCH-FIX-UPSTREAM - https://savannah.gnu.org/bugs/?60016 - complements 
patch2 to cope with QHULL_R_* flags
 Patch3:         octave-qhull_r-fixes.patch
+# PATCH-FIX-UPSTREAM octave-fullscreen-with-multiple-monitors.patch 
badshah...@gmail.com -- fix maximized start on systems with two monitors 
(https://savannah.gnu.org/bugs/?61172)
+Patch4:         octave-fullscreen-with-multiple-monitors.patch
 BuildRequires:  arpack-ng-devel
 # Required for Patch0
 BuildRequires:  autoconf
@@ -223,6 +225,7 @@
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 %build
 


++++++ octave-fullscreen-with-multiple-monitors.patch ++++++

# HG changeset patch
# User Torsten Lilge <ttl-oct...@mailbox.org>
# Date 1642140574 -3600
# Node ID 6ad5bb8f6a6d4332b5db86b507c4ddf876f7a034
# Parent  3c4e851e0220d87ea80efd8269cf8f1546166a05
fix masimized start on systems with two monitors (bug #61172)

* main-window.cc: include QWindow and QScreen;
  (set_window_layout): in maximized mode, only set geometry on systems
  with one monitor and if total and available geometry differ, otherwise
  reduce the geometry by a few pixels

Index: octave-6.4.0/libgui/src/main-window.cc
===================================================================
--- octave-6.4.0.orig/libgui/src/main-window.cc
+++ octave-6.4.0/libgui/src/main-window.cc
@@ -44,6 +44,7 @@
 #include <QMenu>
 #include <QMenuBar>
 #include <QMessageBox>
+#include <QScreen>
 #include <QStyle>
 #include <QStyleFactory>
 #include <QStyleFactory>
@@ -53,6 +54,7 @@
 #include <QThread>
 #include <QTimer>
 #include <QToolBar>
+#include <QWindow>
 
 #if defined (HAVE_QSCINTILLA)
 #  include "file-editor.h"
@@ -1479,7 +1481,29 @@ namespace octave
 
     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 ()))

Reply via email to