[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/qt5

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Feb 27 20:12:44 UTC 2019


 vcl/qt5/Qt5Frame.cxx |   18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

New commits:
commit ccb2ab39935892230e04f536596a0b49a3529f5a
Author:     Aleksei Nikiforov <darktemplar at basealt.ru>
AuthorDate: Mon Feb 25 11:48:07 2019 +0300
Commit:     Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Wed Feb 27 21:12:22 2019 +0100

    tdf#119720 KDE5: Don't show hidden windows on modality change
    
    This change fixes clipping and drawing issues
    for document recovery window and other modal windows.
    
    Change-Id: I005254d4cd2598f4f2d02ba7e7bbf7388affe36c
    Reviewed-on: https://gerrit.libreoffice.org/68307
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit 5e8276e665490d961c333f788469a5ecdb996d16)
    Reviewed-on: https://gerrit.libreoffice.org/68413
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>

diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index 6d96f7926c0f..841350f95704 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -482,13 +482,21 @@ void Qt5Frame::SetModal(bool bModal)
 {
     if (isWindow())
     {
-        if (m_pTopLevel)
-            m_pTopLevel->setVisible(true);
+        bool wasVisible = windowHandle()->isVisible();
+
         // modality change is only effective if the window is hidden
-        windowHandle()->hide();
+        if (wasVisible)
+        {
+            windowHandle()->hide();
+        }
+
         windowHandle()->setModality(bModal ? Qt::WindowModal : Qt::NonModal);
-        // and shown again
-        windowHandle()->show();
+
+        // and shown again if it was visible
+        if (wasVisible)
+        {
+            windowHandle()->show();
+        }
     }
 }
 


More information about the Libreoffice-commits mailing list