summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2015-10-15 00:24:56 -0400
committerraveit65 <[email protected]>2015-10-16 16:19:10 +0200
commitcd971d39fcafc1aa71df342060b039012f1e05af (patch)
tree937aae3a92732ba44f5e21ed417e79d4a4f4081a
parent7b3bf0dc42c752c4403e1fec4778e42e58914388 (diff)
downloadmate-applets-cd971d39fcafc1aa71df342060b039012f1e05af.tar.bz2
mate-applets-cd971d39fcafc1aa71df342060b039012f1e05af.tar.xz
GTK3 charpick: support custom panel themes
support custom panel themes in gtk3 builds, include robust support for transparent themes even when gtk3 has issues properly detecting a compositing window manager e.g. compiz.
-rw-r--r--charpick/charpick.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/charpick/charpick.c b/charpick/charpick.c
index 2b6d5563..a12fee32 100644
--- a/charpick/charpick.c
+++ b/charpick/charpick.c
@@ -319,6 +319,20 @@ populate_menu (charpick_data *curr_data)
list = g_list_next (list);
}
build_table(curr_data);
+
+#if GTK_CHECK_VERSION (3, 0, 0)
+ /*Set up custom theme and transparency support*/
+ GtkWidget *toplevel = gtk_widget_get_toplevel (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 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
}
static void