summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/ctrl.cxx18
-rw-r--r--vcl/source/window/paint.cxx8
2 files changed, 7 insertions, 19 deletions
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index 4ece999ab75b..7cc4cff385bf 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -416,24 +416,6 @@ void Control::ImplInitSettings()
ApplySettings(*this);
}
-void Control::LogicInvalidate(const tools::Rectangle* /*pRectangle*/)
-{
- // Several repaint, resize invalidations are emitted when we are painting,
- // ignore all of those
- if (comphelper::LibreOfficeKit::isActive() && !comphelper::LibreOfficeKit::isDialogPainting())
- {
- if (VclPtr<vcl::Window> pParent = GetParentWithLOKNotifier())
- {
- // invalidate the complete floating window for now
- if (pParent->ImplIsFloatingWindow())
- return pParent->LogicInvalidate(nullptr);
-
- const tools::Rectangle aRect(Point(GetOutOffXPixel(), GetOutOffYPixel()), Size(GetOutputWidthPixel(), GetOutputHeightPixel()));
- pParent->LogicInvalidate(&aRect);
- }
- }
-}
-
tools::Rectangle Control::DrawControlText( OutputDevice& _rTargetDevice, const tools::Rectangle& rRect, const OUString& _rStr,
DrawTextFlags _nStyle, MetricVector* _pVector, OUString* _pDisplayText, const Size* i_pDeviceSize ) const
{
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 53b4e8cc55f1..80f09b193b66 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -1189,7 +1189,7 @@ void Window::Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags )
void Window::LogicInvalidate(const tools::Rectangle* pRectangle)
{
- if (comphelper::LibreOfficeKit::isDialogPainting())
+ if (comphelper::LibreOfficeKit::isDialogPainting() || !comphelper::LibreOfficeKit::isActive())
return;
if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
@@ -1201,6 +1201,12 @@ void Window::LogicInvalidate(const tools::Rectangle* pRectangle)
pNotifier->notifyWindow(GetLOKWindowId(), "invalidate", aPayload);
}
+ // Added for dialog items. Pass invalidation to the parent window.
+ else if (VclPtr<vcl::Window> pParent = GetParentWithLOKNotifier())
+ {
+ const tools::Rectangle aRect(Point(GetOutOffXPixel(), GetOutOffYPixel()), Size(GetOutputWidthPixel(), GetOutputHeightPixel()));
+ pParent->LogicInvalidate(&aRect);
+ }
}
void Window::Validate()