summaryrefslogtreecommitdiff
path: root/gtk/gtkmenubutton.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2012-07-04 15:41:55 -0400
committerCosimo Cecchi <cosimoc@gnome.org>2012-07-05 10:16:42 -0400
commit598163e52684019e4975c3d4ca728a54b00c2f74 (patch)
treec2dc81f425cd959fd8b442480668de59426a38a1 /gtk/gtkmenubutton.c
parent5a5c33097ffe490c6b892c52dafc11e5d8fc0178 (diff)
downloadgtk+-598163e52684019e4975c3d4ca728a54b00c2f74.tar.gz
menubutton: set DROPDOWN_MENU hint on the menu toplevel
So the WM can render the menu shadows correctly, omitting the top side, in the common case the menu is rendered down from a toolbar. https://bugzilla.gnome.org/show_bug.cgi?id=679449
Diffstat (limited to 'gtk/gtkmenubutton.c')
-rw-r--r--gtk/gtkmenubutton.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtkmenubutton.c b/gtk/gtkmenubutton.c
index 63bea8c824..7224f60a43 100644
--- a/gtk/gtkmenubutton.c
+++ b/gtk/gtkmenubutton.c
@@ -147,6 +147,10 @@ menu_position_down_func (GtkMenu *menu,
GdkScreen *screen;
GdkWindow *window;
GtkAllocation allocation, arrow_allocation;
+ GtkWidget *toplevel;
+
+ toplevel = gtk_widget_get_toplevel (GTK_WIDGET (priv->menu));
+ gtk_window_set_type_hint (GTK_WINDOW (toplevel), GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU);
gtk_widget_get_preferred_size (GTK_WIDGET (priv->menu),
&menu_req, NULL);