From 5782871f91db119c4347d69b49eff2c3072eeeda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 25 Aug 2019 14:15:12 +0200 Subject: [PATCH] menubutton: Control sensitivity of child button Instead of the menubutton itself. --- gtk/gtkmenubutton.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk/gtkmenubutton.c b/gtk/gtkmenubutton.c index 33a16903ef..56443769fb 100644 --- a/gtk/gtkmenubutton.c +++ b/gtk/gtkmenubutton.c @@ -706,7 +706,7 @@ gtk_menu_button_init (GtkMenuButton *menu_button) g_signal_connect_swapped (priv->button, "toggled", G_CALLBACK (gtk_menu_button_toggled), menu_button); add_arrow (menu_button); - gtk_widget_set_sensitive (GTK_WIDGET (menu_button), FALSE); + gtk_widget_set_sensitive (priv->button, FALSE); context = gtk_widget_get_style_context (GTK_WIDGET (menu_button)); gtk_style_context_add_class (context, "popup"); @@ -758,7 +758,7 @@ update_sensitivity (GtkMenuButton *menu_button) { GtkMenuButtonPrivate *priv = gtk_menu_button_get_instance_private (menu_button); - gtk_widget_set_sensitive (GTK_WIDGET (menu_button), + gtk_widget_set_sensitive (priv->button, priv->menu != NULL || priv->popover != NULL || priv->create_popup_func != NULL);