summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2019-01-05 09:12:25 -0500
committerAshod Nakashian <ashnakash@gmail.com>2019-01-18 11:16:43 +0100
commitcc7712ba4c70c035cbf080c5cf2f2eb6f9fe3eb1 (patch)
tree020d02ca2f4eed2f680beaae88c394ab58c6b10a
parent49d8cc18a85b7cc30b04b56d52b89d9016d16120 (diff)
vcl: LOK: notify of dialog creation before size change
Notifying the size change of a non-existing dialog is worse than useless. This also fixes the issue with positioning dialogs in the center of the client window. Change-Id: I2e8163f4c5a0a09f79ea11c704c250b17a158948 Reviewed-on: https://gerrit.libreoffice.org/66511 Tested-by: Jenkins Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
-rw-r--r--vcl/source/window/dialog.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index ae98d66ebf61..312608347af9 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -892,6 +892,19 @@ bool Dialog::ImplStartExecute()
std::abort();
}
+ if (bKitActive)
+ {
+ if(const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
+ {
+ std::vector<vcl::LOKPayloadItem> aItems;
+ aItems.emplace_back("type", "dialog");
+ aItems.emplace_back("size", GetSizePixel().toString());
+ if (!GetText().isEmpty())
+ aItems.emplace_back("title", GetText().toUtf8());
+ pNotifier->notifyWindow(GetLOKWindowId(), "created", aItems);
+ }
+ }
+
#ifdef DBG_UTIL
vcl::Window* pParent = GetParent();
if ( pParent )
@@ -950,19 +963,6 @@ bool Dialog::ImplStartExecute()
else
UITestLogger::getInstance().log("ModelessDialogExecuted Id:" + get_id());
- if (bKitActive)
- {
- if(const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
- {
- std::vector<vcl::LOKPayloadItem> aItems;
- aItems.emplace_back("type", "dialog");
- aItems.emplace_back("size", GetSizePixel().toString());
- if (!GetText().isEmpty())
- aItems.emplace_back("title", GetText().toUtf8());
- pNotifier->notifyWindow(GetLOKWindowId(), "created", aItems);
- }
- }
-
return true;
}