vcl/unx/gtk3/gtk3gtkinst.cxx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
New commits: commit c48b021357f4e657291d12fbaa5a2d1a6471ce9b Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun Sep 6 21:00:48 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Sep 7 10:09:15 2020 +0200 tdf#136455 unused ComboBox menu listening to GtkListStore and slowing inserts Since tdf#131120 we don't use the original ComboBox menu, but it's still listening to additions to the ListStore and slowing things down (tdf#136455) Change-Id: Ie2383e1a4b28f0787559132d93236df5c641cb06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102135 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index ab92be3f3c27..5230dcf92a88 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -14279,6 +14279,21 @@ private: return true; } + // Since tdf#131120 we don't use the original ComboBox menu, but it's still + // listening to additions to the ListStore and slowing things down (tdf#136455) + void destroy_unused_menu() + { + AtkObject* pAtkObj = gtk_combo_box_get_popup_accessible(m_pComboBox); + if (!pAtkObj) + return; + if (!GTK_IS_ACCESSIBLE(pAtkObj)) + return; + GtkWidget* pWidget = gtk_accessible_get_widget(GTK_ACCESSIBLE(pAtkObj)); + if (!pWidget) + return; + gtk_widget_destroy(pWidget); + } + public: GtkInstanceComboBox(GtkBuilder* pComboBuilder, GtkComboBox* pComboBox, GtkInstanceBuilder* pBuilder, bool bTakeOwnership) : GtkInstanceContainer(GTK_CONTAINER(gtk_builder_get_object(pComboBuilder, "box")), pBuilder, bTakeOwnership) @@ -14420,6 +14435,8 @@ public: gtk_overlay_add_overlay(m_pOverlay, GTK_WIDGET(m_pOverlayButton)); g_signal_connect(m_pOverlayButton, "leave-notify-event", G_CALLBACK(signalOverlayButtonCrossing), this); g_signal_connect(m_pOverlayButton, "enter-notify-event", G_CALLBACK(signalOverlayButtonCrossing), this); + + destroy_unused_menu(); } virtual int get_active() const override _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits