From 9a6369a54a2aa6a9ed73eabe1452ccc8b3eae27b Mon Sep 17 00:00:00 2001 From: William Wold Date: Mon, 11 Feb 2019 15:58:16 -0500 Subject: Wayland support for panel-background.c --- mate-panel/panel-background.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'mate-panel') diff --git a/mate-panel/panel-background.c b/mate-panel/panel-background.c index ed6fff5d..b0d77afd 100644 --- a/mate-panel/panel-background.c +++ b/mate-panel/panel-background.c @@ -30,7 +30,11 @@ #include #include #include + +#ifdef HAVE_X11 +#include #include +#endif #include "panel-background-monitor.h" #include "panel-util.h" @@ -981,9 +985,13 @@ panel_background_make_string (PanelBackground *background, effective_type = panel_background_effective_type (background); - if (effective_type == PANEL_BACK_IMAGE || - (effective_type == PANEL_BACK_COLOR && background->has_alpha - && (!gdk_window_check_composited_wm(background->window)))) { +#ifdef HAVE_X11 + if (is_using_x11 () && + (effective_type == PANEL_BACK_IMAGE || + (effective_type == PANEL_BACK_COLOR && + background->has_alpha && + !gdk_window_check_composited_wm(background->window)))) { + cairo_surface_t *surface; if (!background->composited_pattern) @@ -996,7 +1004,9 @@ panel_background_make_string (PanelBackground *background, return NULL; retval = g_strdup_printf ("pixmap:%d,%d,%d", (guint32)cairo_xlib_surface_get_drawable (surface), x, y); - } else if (effective_type == PANEL_BACK_COLOR) { + } else +#endif + if (effective_type == PANEL_BACK_COLOR) { gchar *rgba = gdk_rgba_to_string (&background->color); retval = g_strdup_printf ( "color:%s", -- cgit v1.2.1