diff options
Diffstat (limited to 'applets')
-rw-r--r-- | applets/notification_area/status-notifier/sn-dbus-menu.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/applets/notification_area/status-notifier/sn-dbus-menu.c b/applets/notification_area/status-notifier/sn-dbus-menu.c index 9cbab345..50cca5ba 100644 --- a/applets/notification_area/status-notifier/sn-dbus-menu.c +++ b/applets/notification_area/status-notifier/sn-dbus-menu.c @@ -352,10 +352,25 @@ static void sn_dbus_menu_constructed (GObject *object) { SnDBusMenu *menu; + GtkWidget *toplevel; + GdkScreen *screen; + GdkVisual *visual; + GtkStyleContext *context; G_OBJECT_CLASS (sn_dbus_menu_parent_class)->constructed (object); menu = SN_DBUS_MENU (object); + /*Set up theme and transparency support*/ + toplevel = gtk_widget_get_toplevel(GTK_WIDGET(menu)); + /* Fix any failures of compiz/other wm's to communicate with gtk for transparency */ + screen = gtk_widget_get_screen(GTK_WIDGET(toplevel)); + 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 */ + 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"); + menu->name_id = g_bus_watch_name (G_BUS_TYPE_SESSION, menu->bus_name, G_BUS_NAME_WATCHER_FLAGS_NONE, name_appeared_cb, name_vanished_cb, |