summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mate-panel/menu.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/mate-panel/menu.c b/mate-panel/menu.c
index b2c6caa1..dfffce66 100644
--- a/mate-panel/menu.c
+++ b/mate-panel/menu.c
@@ -1016,10 +1016,17 @@ create_fake_menu (MateMenuTreeDirectory *directory)
g_signal_connect (menu, "button_press_event",
G_CALLBACK (menu_dummy_button_press_event), NULL);
-
+
+
+/* Fix any failures of compiz/other wm's to communicate with gtk for transparency */
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkWidget *toplevel = gtk_widget_get_toplevel (menu);
+ 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);
+#endif
return menu;
}
-
GtkWidget *
panel_image_menu_item_new (void)
{
@@ -1327,7 +1334,14 @@ create_applications_menu (const char *menu_file,
G_CALLBACK (remove_matemenu_tree_monitor), tree);
matemenu_tree_unref (tree);
-
+
+/*HACK Fix any failures of compiz/other wm's to communicate with gtk for transparency */
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GtkWidget *toplevel = gtk_widget_get_toplevel (menu);
+ 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);
+#endif
return menu;
}