From 32a5729d18879676d7aa1388f0b44d0589257650 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 2 Nov 2016 07:16:08 +0100 Subject: gtk: Chain up in realize() ... instead of copy/paste from gtk_widget_real_realize. --- gtk/gtkmenuitem.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'gtk/gtkmenuitem.c') diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c index 9330a441e1..f77ea0a1f8 100644 --- a/gtk/gtkmenuitem.c +++ b/gtk/gtkmenuitem.c @@ -1229,17 +1229,12 @@ gtk_menu_item_realize (GtkWidget *widget) GtkMenuItem *menu_item = GTK_MENU_ITEM (widget); GtkMenuItemPrivate *priv = menu_item->priv; GtkAllocation allocation; - GdkWindow *window; - gtk_widget_set_realized (widget, TRUE); - - window = gtk_widget_get_parent_window (widget); - gtk_widget_set_window (widget, window); - g_object_ref (window); + GTK_WIDGET_CLASS (gtk_menu_item_parent_class)->realize (widget); gtk_widget_get_allocation (widget, &allocation); - priv->event_window = gdk_window_new_input (gtk_widget_get_parent_window (widget), + priv->event_window = gdk_window_new_input (gtk_widget_get_window (widget), gtk_widget_get_events (widget) | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK -- cgit v1.2.1