menuitem: Position submenus properly

Now that we can actually query the menu's size, don't query the
preferred minimum size and hope it's correct, but use its actual size.
This commit is contained in:
Benjamin Otte 2011-05-25 04:49:12 +02:00
parent 067dc19177
commit 5f2ef59d69

View File

@ -2147,9 +2147,8 @@ gtk_menu_item_position_menu (GtkMenu *menu,
direction = gtk_widget_get_direction (widget);
gtk_widget_get_preferred_size (GTK_WIDGET (menu), &requisition, NULL);
twidth = requisition.width;
theight = requisition.height;
twidth = gtk_widget_get_allocated_width (GTK_WIDGET (menu));
theight = gtk_widget_get_allocated_width (GTK_WIDGET (menu));
screen = gtk_widget_get_screen (GTK_WIDGET (menu));
monitor_num = gdk_screen_get_monitor_at_window (screen, priv->event_window);