[Libreoffice-commits] core.git: vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Oct 2 15:16:26 UTC 2019
vcl/unx/gtk3/gtk3gtkinst.cxx | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
New commits:
commit 6e7d9c4582c05eee47b0b455444e66b4f2445785
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Oct 2 14:31:59 2019 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Oct 2 17:14:55 2019 +0200
Resolves: tdf#127904 modal depth dips below 0
when validation dialog is run modally, but changed itself to unmodal
during execution.
only NotifyModalHierarchy on modal<->unmodal transition and not on
modality depth
Change-Id: I85d4f67e5b0426aafbf80b1ae25fc3e3f19717af
Reviewed-on: https://gerrit.libreoffice.org/80039
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index e31fb2371bb3..7b5356bee72e 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -3537,8 +3537,9 @@ struct DialogRunner
if (m_xFrameWindow)
{
m_xFrameWindow->IncModalCount();
+ if (m_nModalDepth == 0)
+ m_xFrameWindow->ImplGetFrame()->NotifyModalHierarchy(true);
++m_nModalDepth;
- m_xFrameWindow->ImplGetFrame()->NotifyModalHierarchy(true);
}
}
@@ -3548,7 +3549,8 @@ struct DialogRunner
{
m_xFrameWindow->DecModalCount();
--m_nModalDepth;
- m_xFrameWindow->ImplGetFrame()->NotifyModalHierarchy(false);
+ if (m_nModalDepth == 0)
+ m_xFrameWindow->ImplGetFrame()->NotifyModalHierarchy(false);
}
}
@@ -3608,13 +3610,8 @@ struct DialogRunner
// if, like the calc validation dialog does, the modality was
// toggled off during execution ensure that on cleanup the parent
// is left in the state it was found
- SalFrame* pFrame = m_xFrameWindow->ImplGetFrame();
- do
- {
+ while (m_nModalDepth++ < 0)
m_xFrameWindow->IncModalCount();
- pFrame->NotifyModalHierarchy(true);
- }
- while (++m_nModalDepth < 0);
}
}
};
More information about the Libreoffice-commits
mailing list