Kaydet (Commit) ccb2ab39 authored tarafından Aleksei Nikiforov's avatar Aleksei Nikiforov Kaydeden (comit) Michael Weghorn

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: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit 5e8276e6)
Reviewed-on: https://gerrit.libreoffice.org/68413Reviewed-by: 's avatarMichael Weghorn <m.weghorn@posteo.de>
üst 5f9104ef
...@@ -482,13 +482,21 @@ void Qt5Frame::SetModal(bool bModal) ...@@ -482,13 +482,21 @@ void Qt5Frame::SetModal(bool bModal)
{ {
if (isWindow()) if (isWindow())
{ {
if (m_pTopLevel) bool wasVisible = windowHandle()->isVisible();
m_pTopLevel->setVisible(true);
// modality change is only effective if the window is hidden // modality change is only effective if the window is hidden
windowHandle()->hide(); if (wasVisible)
{
windowHandle()->hide();
}
windowHandle()->setModality(bModal ? Qt::WindowModal : Qt::NonModal); windowHandle()->setModality(bModal ? Qt::WindowModal : Qt::NonModal);
// and shown again
windowHandle()->show(); // and shown again if it was visible
if (wasVisible)
{
windowHandle()->show();
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment