Kaydet (Commit) 5e8276e6 authored tarafından Aleksei Nikiforov's avatar Aleksei Nikiforov Kaydeden (comit) Thorsten Behrens

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>
üst 9ae62c14
......@@ -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();
}
}
}
......
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