summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Wold <[email protected]>2019-02-11 15:58:16 -0500
committerraveit65 <[email protected]>2019-03-10 15:11:45 +0100
commit9a6369a54a2aa6a9ed73eabe1452ccc8b3eae27b (patch)
treeafcae9ce8d8fc1dba7fd28fbe677e13652152529
parent649d1293174715573d5ef29dbdaefc0fb2466a1d (diff)
downloadmate-panel-9a6369a54a2aa6a9ed73eabe1452ccc8b3eae27b.tar.bz2
mate-panel-9a6369a54a2aa6a9ed73eabe1452ccc8b3eae27b.tar.xz
Wayland support for panel-background.c
-rw-r--r--mate-panel/panel-background.c18
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",