From b21ae316e9c500db40129870abb1bd9e0013e950 Mon Sep 17 00:00:00 2001 From: lukefromdc Date: Sat, 27 Feb 2016 00:05:34 -0500 Subject: gtk3.20: custom background work on main panel This makes custom backgrounds show on the panel, the menu, the launcher applets but not yet the tray, the clock button, the trash, or most applets from mate-applets. Sometimes panel BG not drawn after theme change until panel restarted. Still, this is a clue-will keep working. Adding gdk_window_ensure_native (window) was taken from gnome-panel but caused the default background not to show if the system BG is selected and does not explicitly set the theme. Also using this brings back the requirement to restart the panel to fully apply a system BG but progress is being made here. --- mate-panel/panel-widget.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mate-panel/panel-widget.c b/mate-panel/panel-widget.c index ca4ff641..6060524b 100644 --- a/mate-panel/panel-widget.c +++ b/mate-panel/panel-widget.c @@ -1749,8 +1749,11 @@ panel_widget_realize (GtkWidget *widget) /* For auto-hidden panels with a colored background, we need native * windows to avoid some uglyness on unhide */ - gdk_window_ensure_native (window); #endif +#if GTK_CHECK_VERSION (3, 19, 0) + /* Also required to show the background at all with gtk3.20*/ + gdk_window_ensure_native (window); +#endif #if GTK_CHECK_VERSION (3, 0, 0) panel_widget_set_background_default_style (widget); -- cgit v1.2.1