summaryrefslogtreecommitdiff
path: root/mate-panel
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2016-03-24 23:36:34 -0400
committerraveit65 <[email protected]>2016-03-25 11:01:42 +0100
commit448750ef63b8806323a4f4a9ed79e126cab206d6 (patch)
tree2a5256e5970770d92ae1946ac56577166143f20b /mate-panel
parent17a0277ecbc5156e5900efaffab4dcd88062ba98 (diff)
downloadmate-panel-448750ef63b8806323a4f4a9ed79e126cab206d6.tar.bz2
mate-panel-448750ef63b8806323a4f4a9ed79e126cab206d6.tar.xz
Gtk3.18/3.20-move background handling toplevel
panel-applet-frame.c
Diffstat (limited to 'mate-panel')
-rw-r--r--mate-panel/panel-applet-frame.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/mate-panel/panel-applet-frame.c b/mate-panel/panel-applet-frame.c
index 2abe5914..ddd28906 100644
--- a/mate-panel/panel-applet-frame.c
+++ b/mate-panel/panel-applet-frame.c
@@ -123,8 +123,12 @@ mate_panel_applet_frame_draw (GtkWidget *widget,
gtk_style_context_get (context, state,
"background-image", &bg_pattern,
NULL);
- background = &frame->priv->panel->background;
+#if GTK_CHECK_VERSION (3, 18, 0)
+ background = &frame->priv->panel->toplevel->background;
+#else
+ background = &frame->priv->panel->background;
+#endif
if (bg_pattern && (background->type == PANEL_BACK_IMAGE ||
(background->type == PANEL_BACK_COLOR && background->has_alpha))) {
cairo_matrix_t ptm;
@@ -223,9 +227,11 @@ mate_panel_applet_frame_update_background_size (MatePanelAppletFrame *frame,
old_allocation->width == new_allocation->width &&
old_allocation->height == new_allocation->height)
return;
-
+#if GTK_CHECK_VERSION (3, 18, 0)
+ background = &frame->priv->panel->toplevel->background;
+#else
background = &frame->priv->panel->background;
-
+#endif
if (background->type == PANEL_BACK_NONE ||
(background->type == PANEL_BACK_COLOR && !background->has_alpha))
return;
@@ -647,8 +653,11 @@ mate_panel_applet_frame_change_background (MatePanelAppletFrame *frame,
if (frame->priv->has_handle) {
PanelBackground *background;
-
+#if GTK_CHECK_VERSION (3, 18, 0)
+ background = &PANEL_WIDGET (parent)->toplevel->background;
+#else
background = &PANEL_WIDGET (parent)->background;
+#endif
#if GTK_CHECK_VERSION (3, 0, 0)
panel_background_apply_css (background, GTK_WIDGET (frame));
#else
@@ -744,7 +753,11 @@ _mate_panel_applet_frame_update_flags (MatePanelAppletFrame *frame,
* it */
PanelBackground *background;
+#if GTK_CHECK_VERSION (3, 18, 0)
+ background = &frame->priv->panel->toplevel->background;
+#else
background = &frame->priv->panel->background;
+#endif
mate_panel_applet_frame_change_background (frame, background->type);
}
}
@@ -800,8 +813,11 @@ _mate_panel_applet_frame_get_background_string (MatePanelAppletFrame *frame,
break;
}
}
-
+#if GTK_CHECK_VERSION (3, 18, 0)
+ return panel_background_make_string (&panel->toplevel->background, x, y);
+#else
return panel_background_make_string (&panel->background, x, y);
+#endif
}
static void