summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/customweld.hxx7
-rw-r--r--sc/source/ui/app/inputwin.cxx1
-rw-r--r--svx/source/dialog/weldeditview.cxx3
3 files changed, 6 insertions, 5 deletions
diff --git a/include/vcl/customweld.hxx b/include/vcl/customweld.hxx
index 64f980732dfb..df7b97e070d7 100644
--- a/include/vcl/customweld.hxx
+++ b/include/vcl/customweld.hxx
@@ -63,7 +63,12 @@ public:
}
virtual void Show() { m_pDrawingArea->show(); }
virtual void Hide() { m_pDrawingArea->hide(); }
- void GrabFocus() { m_pDrawingArea->grab_focus(); }
+ void GrabFocus()
+ {
+ m_pDrawingArea->grab_focus();
+ if (m_pDrawingArea->has_focus())
+ GetFocus();
+ }
bool HasFocus() const { return m_pDrawingArea->has_focus(); }
bool IsVisible() const { return m_pDrawingArea->get_visible(); }
bool IsReallyVisible() const { return m_pDrawingArea->is_visible(); }
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 311611678148..1632ce1f3e09 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -2051,7 +2051,6 @@ void ScTextWnd::StyleUpdated()
void ScTextWnd::TextGrabFocus()
{
GrabFocus();
- GetFocus();
}
// Position window
diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx
index 9bf6f599c857..1031385282e5 100644
--- a/svx/source/dialog/weldeditview.cxx
+++ b/svx/source/dialog/weldeditview.cxx
@@ -137,10 +137,7 @@ bool WeldEditView::MouseButtonDown(const MouseEvent& rMEvt)
CaptureMouse();
if (!HasFocus())
- {
GrabFocus();
- GetFocus();
- }
return m_xEditView && m_xEditView->MouseButtonDown(rMEvt);
}