diff options
author | lukefromdc <[email protected]> | 2017-04-25 23:37:45 -0400 |
---|---|---|
committer | monsta <[email protected]> | 2017-08-07 17:23:31 +0300 |
commit | 250e6874f0e0d2f0cbfdcaa0fc92f28840ada7d9 (patch) | |
tree | 156b8294e53e2536c774d2ef2e8026adeed59582 /plugins | |
parent | 38bcccd6ad78c633f6fec4be4796b2334e632b2e (diff) | |
download | mate-settings-daemon-250e6874f0e0d2f0cbfdcaa0fc92f28840ada7d9.tar.bz2 mate-settings-daemon-250e6874f0e0d2f0cbfdcaa0fc92f28840ada7d9.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 (); |