summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/customweld.hxx1
-rw-r--r--sfx2/source/control/charwin.cxx3
2 files changed, 3 insertions, 1 deletions
diff --git a/include/vcl/customweld.hxx b/include/vcl/customweld.hxx
index a96d8c5522fe..e37555b36777 100644
--- a/include/vcl/customweld.hxx
+++ b/include/vcl/customweld.hxx
@@ -65,6 +65,7 @@ public:
virtual void Hide() { m_pDrawingArea->hide(); }
void GrabFocus() { m_pDrawingArea->grab_focus(); }
bool HasFocus() const { return m_pDrawingArea->has_focus(); }
+ bool HasChildFocus() const { return m_pDrawingArea->has_child_focus(); }
bool IsVisible() const { return m_pDrawingArea->get_visible(); }
bool IsReallyVisible() const { return m_pDrawingArea->is_visible(); }
bool IsEnabled() const { return m_pDrawingArea->get_sensitive(); }
diff --git a/sfx2/source/control/charwin.cxx b/sfx2/source/control/charwin.cxx
index eb5b5662a817..6b7c8cd8b514 100644
--- a/sfx2/source/control/charwin.cxx
+++ b/sfx2/source/control/charwin.cxx
@@ -189,7 +189,8 @@ void SvxCharView::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
aPoint.setX(-aBoundRect.Left() + (aSize.Width() - aBoundRect.GetWidth()) / 2);
}
- if (HasFocus())
+ // tdf#111924 - don't lose focus on context menu
+ if (HasFocus() || HasChildFocus())
{
rRenderContext.SetFillColor(aHighlightColor);
rRenderContext.DrawRect(tools::Rectangle(Point(0, 0), aSize));