menu: Listen only for notify::root

We no longer emit the display-changed signal,
so stop listening.
This commit is contained in:
Matthias Clasen 2019-05-01 22:52:13 +00:00
parent 33a8108f19
commit d7c54920ee

View File

@ -1045,14 +1045,6 @@ menu_change_display (GtkMenu *menu,
priv->monitor_num = -1;
}
static void
attach_widget_display_changed (GtkWidget *attach_widget,
GdkDisplay *previous_display,
GtkMenu *menu)
{
menu_change_display (menu, gtk_widget_get_display (attach_widget));
}
static void
attach_widget_root_changed (GObject *attach_widget,
GParamSpec *pspec,
@ -1115,11 +1107,9 @@ gtk_menu_attach_to_widget (GtkMenu *menu,
data = g_slice_new (GtkMenuAttachData);
data->attach_widget = attach_widget;
g_signal_connect (attach_widget, "display-changed",
G_CALLBACK (attach_widget_display_changed), menu);
g_signal_connect (attach_widget, "notify::root",
G_CALLBACK (attach_widget_root_changed), menu);
attach_widget_display_changed (attach_widget, NULL, menu);
attach_widget_root_changed (G_OBJECT (attach_widget), NULL, menu);
data->detacher = detacher;
g_object_set_data (G_OBJECT (menu), I_(attach_data_key), data);
@ -1198,9 +1188,6 @@ gtk_menu_detach (GtkMenu *menu)
gtk_window_set_attached_to (toplevel, NULL);
}
g_signal_handlers_disconnect_by_func (data->attach_widget,
(gpointer) attach_widget_display_changed,
menu);
g_signal_handlers_disconnect_by_func (data->attach_widget,
(gpointer) attach_widget_root_changed,
menu);