forked from AuroraMiddleware/gtk
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:
parent
067dc19177
commit
5f2ef59d69
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user