[Libreoffice-commits] core.git: vcl/qt5

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Feb 27 00:01:23 UTC 2019


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

New commits:
commit 5e8276e665490d961c333f788469a5ecdb996d16
Author:     Aleksei Nikiforov <darktemplar at basealt.ru>
AuthorDate: Mon Feb 25 11:48:07 2019 +0300
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Wed Feb 27 01:01:02 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>

diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index a1c51c967c0a..d633b0836557 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -493,13 +493,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