From 40bb634d564dbf752fcc3420d3d92cef94eea592 Mon Sep 17 00:00:00 2001 From: lukefromdc Date: Thu, 24 Mar 2016 23:38:33 -0400 Subject: Gtk3.18/3.20-move background handling toplevel panel-menu-bar.c --- mate-panel/panel-menu-bar.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mate-panel/panel-menu-bar.c b/mate-panel/panel-menu-bar.c index 3f0c9b9f..c926e5a0 100644 --- a/mate-panel/panel-menu-bar.c +++ b/mate-panel/panel-menu-bar.c @@ -274,8 +274,11 @@ static void panel_menu_bar_size_allocate(GtkWidget* widget, GtkAllocation* alloc return; } +#if GTK_CHECK_VERSION (3, 18, 0) + background = &PANEL_MENU_BAR(widget)->priv->panel->toplevel->background; +#else background = &PANEL_MENU_BAR(widget)->priv->panel->background; - +#endif if (background->type == PANEL_BACK_NONE || (background->type == PANEL_BACK_COLOR && !background->has_alpha)) { return; @@ -483,7 +486,9 @@ void panel_menu_bar_popup_menu(PanelMenuBar* menubar, guint32 activate_time) void panel_menu_bar_change_background(PanelMenuBar* menubar) { -#if GTK_CHECK_VERSION (3, 0, 0) +#if GTK_CHECK_VERSION (3, 18, 0) + panel_background_apply_css(&menubar->priv->panel->toplevel->background, GTK_WIDGET(menubar)); +#elif GTK_CHECK_VERSION (3, 0, 0) panel_background_apply_css(&menubar->priv->panel->background, GTK_WIDGET(menubar)); #else panel_background_change_background_on_widget(&menubar->priv->panel->background, GTK_WIDGET(menubar)); -- cgit v1.2.1