[gtk+/gtk-3-2] menuitem: Always treat submenus as popup
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-2] menuitem: Always treat submenus as popup
- Date: Sat, 12 Nov 2011 04:09:56 +0000 (UTC)
commit 31df36cbfe7a3a88fbd9178bae84a992bbddc0d6
Author: Florian MÃllner <fmuellner gnome org>
Date: Tue Oct 25 15:42:59 2011 +0200
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
gtk/gtkmenuitem.c | 16 +---------------
1 files changed, 1 insertions(+), 15 deletions(-)
---
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index d21b363..1233085 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -2175,21 +2175,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)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]