summaryrefslogtreecommitdiff
path: root/gtk/gtkmenuitem.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2016-11-02 07:16:08 +0100
committerBenjamin Otte <otte@redhat.com>2016-11-02 07:16:08 +0100
commit32a5729d18879676d7aa1388f0b44d0589257650 (patch)
tree15e44f83bb53648c98268d1d77d13848db4011f8 /gtk/gtkmenuitem.c
parentb0a5e8764c59043dc9b38f300e9b44a878aec26c (diff)
downloadgtk+-32a5729d18879676d7aa1388f0b44d0589257650.tar.gz
gtk: Chain up in realize()
... instead of copy/paste from gtk_widget_real_realize.
Diffstat (limited to 'gtk/gtkmenuitem.c')
-rw-r--r--gtk/gtkmenuitem.c9
1 files changed, 2 insertions, 7 deletions
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