GtkMenu: Add a separate style class to the toplevel of menus

This is necessary in order to use .window-frame.csd.popup for
styling csd menus.

https://bugzilla.gnome.org/show_bug.cgi?id=731187
This commit is contained in:
Matthias Clasen 2014-06-06 19:06:15 -04:00
parent e9ed210b0b
commit 3cf916be8a

View File

@ -1099,6 +1099,8 @@ gtk_menu_init (GtkMenu *menu)
gtk_window_set_resizable (GTK_WINDOW (priv->toplevel), FALSE); gtk_window_set_resizable (GTK_WINDOW (priv->toplevel), FALSE);
gtk_window_set_mnemonic_modifier (GTK_WINDOW (priv->toplevel), 0); gtk_window_set_mnemonic_modifier (GTK_WINDOW (priv->toplevel), 0);
gtk_style_context_add_class (gtk_widget_get_style_context (priv->toplevel), "popup");
/* Refloat the menu, so that reference counting for the menu isn't /* Refloat the menu, so that reference counting for the menu isn't
* affected by it being a child of the toplevel * affected by it being a child of the toplevel
*/ */