diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gpm-tray-icon.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gpm-tray-icon.c b/src/gpm-tray-icon.c index 967e4c2..ab595c8 100644 --- a/src/gpm-tray-icon.c +++ b/src/gpm-tray-icon.c @@ -333,6 +333,20 @@ gpm_tray_icon_create_menu (GpmTrayIcon *icon, guint32 timestamp) g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (gpm_tray_icon_show_preferences_cb), icon); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); + +#if GTK_CHECK_VERSION (3, 0, 0) + /*Set up custom panel menu theme support-gtk3 only */ + GtkWidget *toplevel = gtk_widget_get_toplevel (menu); + /* Fix any failures of compiz/other wm's to communicate with gtk for transparency in menu theme */ + 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 /* about */ item = gtk_image_menu_item_new_from_stock (GTK_STOCK_ABOUT, NULL); |