summaryrefslogtreecommitdiff
path: root/mate-panel/panel-context-menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'mate-panel/panel-context-menu.c')
-rw-r--r--mate-panel/panel-context-menu.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/mate-panel/panel-context-menu.c b/mate-panel/panel-context-menu.c
index 49e8c9b2..b44ce112 100644
--- a/mate-panel/panel-context-menu.c
+++ b/mate-panel/panel-context-menu.c
@@ -314,5 +314,19 @@ panel_context_menu_create (PanelWidget *panel)
//FIXME: can we get rid of this? (needed by menu_get_panel())
g_object_set_data (G_OBJECT (retval), "menu_panel", panel);
+/* Set up theme and transparency support */
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkWidget *toplevel = gtk_widget_get_toplevel (retval);
+/* Fix any failures of compiz/other wm's to communicate with gtk for transparency */
+ GdkScreen *screen = gtk_widget_get_screen(GTK_WIDGET(toplevel));
+ GdkVisual *visual = gdk_screen_get_rgba_visual(screen);
+ gtk_widget_set_visual(GTK_WIDGET(toplevel), visual);
+/* Set menu and it's toplevel window to follow panel theme */
+ GtkStyleContext *context;
+ context = gtk_widget_get_style_context (GTK_WIDGET(toplevel));
+ gtk_style_context_add_class(context,"gnome-panel-menu-bar");
+ gtk_style_context_add_class(context,"mate-panel-menu-bar");
+#endif
+
return retval;
}