diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-05-02 21:21:36 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-05-03 21:55:59 +0200 |
commit | 2d45f87330ef7011711767cc736829e4082b236b (patch) | |
tree | 4b678332797429c19a7b55ee8cae6d01fd416181 /vcl/unx | |
parent | 7e64aaebce8667f7ab173ea3807c62f81138b4af (diff) |
support native focus for drawing sub region
Change-Id: I9862f060b9d5b2c3015c084060887f2d66f1ed01
Reviewed-on: https://gerrit.libreoffice.org/53768
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index b33013916a85..ed78e141b124 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -3506,6 +3506,13 @@ private: cairo_set_source_surface(cr, m_pSurface, 0, 0); cairo_paint(cr); + + tools::Rectangle aFocusRect(m_aGetFocusRectHdl.Call(*this)); + if (!aFocusRect.IsEmpty()) + { + gtk_render_focus(gtk_widget_get_style_context(GTK_WIDGET(m_pDrawingArea)), cr, + aFocusRect.Left(), aFocusRect.Top(), aFocusRect.GetWidth(), aFocusRect.GetHeight()); + } } static void signalSizeAllocate(GtkWidget*, GdkRectangle* allocation, gpointer widget) { |