[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Sep 8 15:10:10 UTC 2020
vcl/unx/gtk3/gtk3gtkinst.cxx | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
New commits:
commit c16a7e629599086610e00fefadfcfc6367195275
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Sep 6 21:00:48 2020 +0100
Commit: Miklos Vajna <vmiklos at collabora.com>
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 <vmiklos at collabora.com>
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
More information about the Libreoffice-commits
mailing list