vcl/qt5/Qt5Frame.cxx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)
New commits: commit ccb2ab39935892230e04f536596a0b49a3529f5a Author: Aleksei Nikiforov <darktemp...@basealt.ru> AuthorDate: Mon Feb 25 11:48:07 2019 +0300 Commit: Michael Weghorn <m.wegh...@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.behr...@cib.de> (cherry picked from commit 5e8276e665490d961c333f788469a5ecdb996d16) Reviewed-on: https://gerrit.libreoffice.org/68413 Reviewed-by: Michael Weghorn <m.wegh...@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(); + } } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits