summaryrefslogtreecommitdiff
path: root/gtk/gtkscrollbar.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-03-19 18:03:16 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-03-19 18:03:16 -0400
commit31db61588543a1ba0935ac8ecb2ecac574c0a836 (patch)
treea2e2092e086a9c7d618e2c9ae1fc7b5a659e8a7a /gtk/gtkscrollbar.c
parent3ac4c76b18cc89a841ce09f0943539f16988fd21 (diff)
downloadgtk+-31db61588543a1ba0935ac8ecb2ecac574c0a836.tar.gz
Revert "Merge branch 'disable-window-test' into 'master'"
This reverts commit 3ac4c76b18cc89a841ce09f0943539f16988fd21, reversing changes made to 6ec96d2e989d029a303b8b20ec72b86f974c0e87.
Diffstat (limited to 'gtk/gtkscrollbar.c')
-rw-r--r--gtk/gtkscrollbar.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gtk/gtkscrollbar.c b/gtk/gtkscrollbar.c
index f97d3d7647..432000ae5f 100644
--- a/gtk/gtkscrollbar.c
+++ b/gtk/gtkscrollbar.c
@@ -209,6 +209,16 @@ gtk_scrollbar_class_init (GtkScrollbarClass *class)
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BOX_LAYOUT);
}
+static gboolean
+emit_popup_menu (GtkWidget *self)
+{
+ gboolean handled;
+
+ g_signal_emit_by_name (self, "popup-menu", &handled);
+
+ return handled;
+}
+
static void
gtk_scrollbar_init (GtkScrollbar *self)
{
@@ -217,6 +227,7 @@ gtk_scrollbar_init (GtkScrollbar *self)
priv->orientation = GTK_ORIENTATION_HORIZONTAL;
priv->range = g_object_new (GTK_TYPE_RANGE, NULL);
+ g_signal_connect_swapped (priv->range, "popup-menu", G_CALLBACK (emit_popup_menu), self);
gtk_widget_set_hexpand (priv->range, TRUE);
gtk_widget_set_vexpand (priv->range, TRUE);
gtk_widget_set_parent (priv->range, GTK_WIDGET (self));