diff options
-rw-r--r-- | mate-panel/panel-background.c | 18 |
1 files changed, 14 insertions, 4 deletions
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 <gdk/gdk.h> #include <gtk/gtk.h> #include <cairo.h> + +#ifdef HAVE_X11 +#include <xstuff.h> #include <cairo-xlib.h> +#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", |