summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2017-12-07 21:55:28 +0530
committerPranav Kant <pranavk@collabora.co.uk>2017-12-09 00:15:23 +0530
commit42fae43d70d3d1b8fcc9fc6328b1060d6d72abfc (patch)
tree210a4fed99e6ad02aa623db510aa3a85f298636f /vcl
parent13ca879fba12c53f2856186f5cd8509efe625774 (diff)
lokdialog: Open floating window on InitShow only
Okay, my bad. InitShow happens after Visible. And InitShow also does some layouting. Emitting the created callback on InitShow means sending more accurate sizes, etc. The different in sizes is 0 for combo boxes, but significant for custom controls like color picker, etc. So emit created callback on InitShow to keep custom controls working. Change-Id: I40b6a18b917dff0eebcfd4c273f3399f3bdc7456
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/floatwin.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index d6890e4823cc..d533f558ec6b 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -604,9 +604,9 @@ void FloatingWindow::StateChanged( StateChangedType nType )
SystemWindow::StateChanged( nType );
VclPtr<vcl::Window> pParent = GetParentWithLOKNotifier();
- if (pParent && nType == StateChangedType::Visible)
+ if (pParent)
{
- if (IsVisible())
+ if (nType == StateChangedType::InitShow)
{
std::vector<vcl::LOKPayloadItem> aItems;
if (pParent == this)
@@ -626,7 +626,7 @@ void FloatingWindow::StateChanged( StateChangedType nType )
aItems.emplace_back(std::make_pair("position", mpImplData->maPos.toString()));
GetLOKNotifier()->notifyWindow(GetLOKWindowId(), "created", aItems);
}
- else if (!IsVisible())
+ else if (!IsVisible() && nType == StateChangedType::Visible)
{
assert(GetLOKNotifier());
GetLOKNotifier()->notifyWindow(GetLOKWindowId(), "close");