vcl/unx/gtk3/gtk3gtkinst.cxx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
New commits: commit c16a7e629599086610e00fefadfcfc6367195275 Author: Caolán McNamara <[email protected]> AuthorDate: Sun Sep 6 21:00:48 2020 +0100 Commit: Miklos Vajna <[email protected]> CommitDate: Tue Sep 8 17:09:33 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/+/102119 Tested-by: Jenkins Reviewed-by: Miklos Vajna <[email protected]> diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index e53e0e6a546b..31d2cf1fc009 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -13777,6 +13777,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) @@ -13918,6 +13933,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 [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
