diff options
author | lukefromdc <[email protected]> | 2015-10-14 21:36:50 -0400 |
---|---|---|
committer | raveit65 <[email protected]> | 2015-10-15 14:39:54 +0200 |
commit | a22a3dbd0d254c2ac34447ae538c0b296a648869 (patch) | |
tree | ce3fdbe3c445bc511311213947d96d764c540217 /plugins | |
parent | 48bc4a303cdd30946451cc9e9ff07cc1f4eca4c1 (diff) | |
download | mate-settings-daemon-a22a3dbd0d254c2ac34447ae538c0b296a648869.tar.bz2 mate-settings-daemon-a22a3dbd0d254c2ac34447ae538c0b296a648869.tar.xz |
GTK3: xrandr tray applet support custom panel themes
xrandr tray applet (gtk3) support custom panel themes,
with robust support for transparency in cases where gtk3
does not correctly detect a compositing window manager
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/xrandr/msd-xrandr-manager.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/plugins/xrandr/msd-xrandr-manager.c b/plugins/xrandr/msd-xrandr-manager.c index 0aeba33..840ff1c 100644 --- a/plugins/xrandr/msd-xrandr-manager.c +++ b/plugins/xrandr/msd-xrandr-manager.c @@ -2118,7 +2118,21 @@ status_icon_popup_menu (MsdXrandrManager *manager, guint button, guint32 timesta g_signal_connect (priv->popup_menu, "selection-done", G_CALLBACK (status_icon_popup_menu_selection_done_cb), manager); - + +#if GTK_CHECK_VERSION (3, 0, 0) + /*Set up custom theming and forced transparency support*/ + GtkWidget *toplevel = gtk_widget_get_toplevel (priv->popup_menu); + /*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 up the gtk theme class from mate-panel*/ + GtkStyleContext *context; + context = gtk_widget_get_style_context (GTK_WIDGET(toplevel)); + gtk_style_context_remove_class (context,GTK_STYLE_CLASS_BACKGROUND); + gtk_style_context_add_class(context,"gnome-panel-menu-bar"); + gtk_style_context_add_class(context,"mate-panel-menu-bar"); +#endif gtk_menu_popup (GTK_MENU (priv->popup_menu), NULL, NULL, gtk_status_icon_position_menu, priv->status_icon, button, timestamp); |