summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-10-20 10:55:33 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-10-22 21:40:44 +0200
commitd7c8799c14e16060a834dcaf50aa962a27d31314 (patch)
tree68e70a4a1a85e73d63891ce0576a9b331ca2f1ab /include
parentcfadad134c6ab00a406a527e838d2e4940d337eb (diff)
always call GetFocus if GrabFocus succeeded
so the CustomWidgetController can replace vcl::Control more seamlessly Change-Id: I3c2ff9c45ff0dc55b09863611df2a7d941d1c534 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104574 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/customweld.hxx7
1 files changed, 6 insertions, 1 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(); }