diff options
author | lukefromdc <[email protected]> | 2017-04-25 23:37:45 -0400 |
---|---|---|
committer | lukefromdc <[email protected]> | 2017-04-26 17:15:00 -0400 |
commit | d828fa74ba1e859f2e1e9f4d470708b74b26c4f9 (patch) | |
tree | 3b0bd744257cd93320e6f3eeed50c8ed7094fa96 /plugins | |
parent | 6846316036fac06132404e9eedad8891948b56f8 (diff) | |
download | mate-settings-daemon-d828fa74ba1e859f2e1e9f4d470708b74b26c4f9.tar.bz2 mate-settings-daemon-d828fa74ba1e859f2e1e9f4d470708b74b26c4f9.tar.xz |
keyboard plugin: apply panel menu theme to popup menu
This menu was not noticed back in 2015 when support for custom panel menu themes was added
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/keyboard/msd-keyboard-xkb.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/keyboard/msd-keyboard-xkb.c b/plugins/keyboard/msd-keyboard-xkb.c index 4f1cf28..2b68818 100644 --- a/plugins/keyboard/msd-keyboard-xkb.c +++ b/plugins/keyboard/msd-keyboard-xkb.c @@ -257,8 +257,22 @@ popup_menu_set_group (GtkMenuItem * item, gpointer param) static void status_icon_popup_menu_cb (GtkStatusIcon * icon, guint button, guint time) { + GtkWidget *toplevel; + GdkScreen *screen; + GdkVisual *visual; + GtkStyleContext *context; GtkMenu *popup_menu = GTK_MENU (gtk_menu_new ()); GtkMenu *groups_menu = GTK_MENU (gtk_menu_new ()); + /*Set up theme and transparency support*/ + toplevel = gtk_widget_get_toplevel (GTK_WIDGET(popup_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"); int i = 0; gchar **current_name = matekbd_status_get_group_names (); |