diff options
author | Henry Castro <hcastro@collabora.com> | 2020-12-17 10:45:13 -0400 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2021-04-09 11:55:13 +0200 |
commit | 7f342a9874f64681628ec72b6d96d8fd607da765 (patch) | |
tree | 06caf01a6fed1c46d5ea5cdef2fc13cd3cf8660e /vcl/jsdialog | |
parent | d07e21ba5ff2d296cf86c20a37b59dae368773dd (diff) |
jsdialog: disable idle notify
After testing on client side, when showing
the Macro Selector Dialog its receive 5 times
the same data.
So add an option to not use the idle notifier
instead it will use the event 'WindowShow'.
Change-Id: Ib5657f3c823fc6e998581b99052aaf578d0913e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107893
Tested-by: Jenkins
Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'vcl/jsdialog')
-rw-r--r-- | vcl/jsdialog/jsdialogbuilder.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index b761d5b80312..84dcbda81208 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -107,6 +107,9 @@ void JSDialogNotifyIdle::sendClose() { send(generateCloseMessage()); } void JSDialogSender::notifyDialogState(bool bForce) { + if (mpIdleNotify->getNotifierWindow()->IsDisableIdleNotify()) + return; + if (bForce) mpIdleNotify->ForceUpdate(); mpIdleNotify->Start(); @@ -404,6 +407,9 @@ std::unique_ptr<weld::Dialog> JSInstanceBuilder::weld_dialog(const OString& id) RememberWidget("__DIALOG__", pRet.get()); + if (id == "MacroSelectorDialog") + pDialog->SetDisableIdleNotify(true); + const vcl::ILibreOfficeKitNotifier* pNotifier = pDialog->GetLOKNotifier(); if (pNotifier && id != "MacroSelectorDialog") { |