[mutter/bilelmoussaoui/x11-build-guards: 326/329] compositor/dnd: Guard X11 types
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/bilelmoussaoui/x11-build-guards: 326/329] compositor/dnd: Guard X11 types
- Date: Thu, 22 Sep 2022 15:53:09 +0000 (UTC)
commit 6ddec3f546bd5f6a9ae2cbe0ee912c2ac2307556
Author: Bilal Elmoussaoui <belmouss redhat com>
Date: Wed Jun 1 09:39:01 2022 +0200
compositor/dnd: Guard X11 types
src/backends/meta-dnd-private.h | 7 ++++++-
src/compositor/meta-dnd.c | 4 ++++
src/x11/meta-x11-display.c | 2 ++
3 files changed, 12 insertions(+), 1 deletion(-)
---
diff --git a/src/backends/meta-dnd-private.h b/src/backends/meta-dnd-private.h
index a4cb372207..856b88942e 100644
--- a/src/backends/meta-dnd-private.h
+++ b/src/backends/meta-dnd-private.h
@@ -21,17 +21,22 @@
#define META_DND_PRIVATE__H
#include <glib.h>
+
+#ifdef HAVE_X11
#include <X11/Xlib.h>
+#include "compositor/meta-compositor-x11.h"
+#endif
#include "backends/meta-backend-private.h"
-#include "compositor/meta-compositor-x11.h"
+#ifdef HAVE_X11
gboolean meta_dnd_handle_xdnd_event (MetaBackend *backend,
MetaCompositorX11 *compositor_x11,
Display *xdisplay,
XEvent *xev);
void meta_dnd_init_xdnd (MetaX11Display *x11_display);
+#endif
#ifdef HAVE_WAYLAND
void meta_dnd_wayland_handle_begin_modal (MetaCompositor *compositor);
diff --git a/src/compositor/meta-dnd.c b/src/compositor/meta-dnd.c
index 4053ccaeaf..7dd7d9db97 100644
--- a/src/compositor/meta-dnd.c
+++ b/src/compositor/meta-dnd.c
@@ -108,6 +108,7 @@ meta_dnd_init (MetaDnd *dnd)
{
}
+#ifdef HAVE_X11
void
meta_dnd_init_xdnd (MetaX11Display *x11_display)
{
@@ -136,6 +137,7 @@ meta_dnd_init_xdnd (MetaX11Display *x11_display)
XInternAtom (xdisplay, "XdndProxy", TRUE), XA_WINDOW,
32, PropModeReplace, (const unsigned char *) &xwindow, 1);
}
+#endif
static void
meta_dnd_notify_dnd_enter (MetaDnd *dnd)
@@ -165,6 +167,7 @@ meta_dnd_notify_dnd_leave (MetaDnd *dnd)
*
* http://www.freedesktop.org/wiki/Specifications/XDND
*/
+#ifdef HAVE_X11
gboolean
meta_dnd_handle_xdnd_event (MetaBackend *backend,
MetaCompositorX11 *compositor_x11,
@@ -224,6 +227,7 @@ meta_dnd_handle_xdnd_event (MetaBackend *backend,
return FALSE;
}
+#endif
#ifdef HAVE_WAYLAND
static void
diff --git a/src/x11/meta-x11-display.c b/src/x11/meta-x11-display.c
index 6da98215d4..71ff104b3e 100644
--- a/src/x11/meta-x11-display.c
+++ b/src/x11/meta-x11-display.c
@@ -1393,8 +1393,10 @@ meta_x11_display_new (MetaDisplay *display,
meta_x11_startup_notification_init (x11_display);
meta_x11_selection_init (x11_display);
+#ifdef HAVE_X11
if (!meta_is_wayland_compositor ())
meta_dnd_init_xdnd (x11_display);
+#endif
sprintf (buf, "WM_S%d", number);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]