vcl/qt5/Qt5Frame.cxx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)
New commits: commit 5e8276e665490d961c333f788469a5ecdb996d16 Author: Aleksei Nikiforov <darktemp...@basealt.ru> AuthorDate: Mon Feb 25 11:48:07 2019 +0300 Commit: Thorsten Behrens <thorsten.behr...@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.behr...@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(); + } } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits