summaryrefslogtreecommitdiff
path: root/gtk/gtkmenuitem.c
diff options
context:
space:
mode:
authorFlorian Müllner <fmuellner@gnome.org>2011-10-25 15:42:59 +0200
committerMatthias Clasen <mclasen@redhat.com>2011-11-05 01:49:50 -0400
commit79803d0edcd77f8060b0dac46b86ed1aa47bb79b (patch)
tree0b8f2742cc2fee001ed91e48f14ed949ad0ec247 /gtk/gtkmenuitem.c
parent4d7e47ddd0590a6cad1bdf5d785203e8aa9f259e (diff)
downloadgtk+-79803d0edcd77f8060b0dac46b86ed1aa47bb79b.tar.gz
menuitem: Always treat submenus as popup
Submenus are not actually attached to a menubar, but styling them as if they were imposes some problems (at least with Adwaita). Just using GDK_WINDOW_TYPE_HINT_POPUP_MENU for submenus instead fixes the issue. https://bugzilla.gnome.org/show_bug.cgi?id=662691
Diffstat (limited to 'gtk/gtkmenuitem.c')
-rw-r--r--gtk/gtkmenuitem.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index 95a862b9c5..56c97e55e3 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -2168,21 +2168,7 @@ gtk_menu_item_position_menu (GtkMenu *menu,
available_right = monitor.x + monitor.width - (tx + allocation.width);
parent = gtk_widget_get_parent (widget);
- if (GTK_IS_MENU_BAR (parent))
- {
- priv->from_menubar = TRUE;
- }
- else if (GTK_IS_MENU (parent))
- {
- if (GTK_MENU (parent)->priv->parent_menu_item)
- priv->from_menubar = GTK_MENU_ITEM (GTK_MENU (parent)->priv->parent_menu_item)->priv->from_menubar;
- else
- priv->from_menubar = FALSE;
- }
- else
- {
- priv->from_menubar = FALSE;
- }
+ priv->from_menubar = GTK_IS_MENU_BAR (parent);
switch (priv->submenu_placement)
{