diff --git a/src/Makefile.am b/src/Makefile.am
index ebcf263a5..0bc63b718 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -16,7 +16,6 @@ INCLUDES= \
-I$(srcdir)/core \
-I$(srcdir)/ui \
-I$(srcdir)/compositor \
- -I$(srcdir)/x11 \
-DMUTTER_LIBEXECDIR=\"$(libexecdir)\" \
-DHOST_ALIAS=\"@HOST_ALIAS@\" \
-DMUTTER_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" \
diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c
index e98c0c5c6..fa723fa46 100644
--- a/src/compositor/compositor.c
+++ b/src/compositor/compositor.c
@@ -65,7 +65,6 @@
#include
#include "compositor-private.h"
#include
-#include "xprops.h"
#include
#include
#include
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index a4368356d..a626328e0 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -20,7 +20,6 @@
#include "frame.h"
#include
#include
-#include "xprops.h"
#include "compositor-private.h"
#include "meta-shaped-texture-private.h"
diff --git a/src/core/display.c b/src/core/display.c
index 3a068b8c7..1bd451a89 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -36,15 +36,11 @@
#include
#include "screen-private.h"
#include "window-private.h"
-#include "window-x11.h"
-#include "window-props.h"
-#include "group-props.h"
#include "frame.h"
#include
#include "keybindings-private.h"
#include
#include "resizepopup.h"
-#include "xprops.h"
#include "workspace-private.h"
#include "bell.h"
#include
@@ -72,6 +68,11 @@
#include
#include
+#include "x11/window-x11.h"
+#include "x11/window-props.h"
+#include "x11/group-props.h"
+#include "x11/xprops.h"
+
#include "meta-xwayland-private.h"
#include "meta-surface-actor-wayland.h"
diff --git a/src/core/screen.c b/src/core/screen.c
index 512a722a6..8e0398917 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -39,7 +39,6 @@
#include "workspace-private.h"
#include "keybindings-private.h"
#include "stack.h"
-#include "xprops.h"
#include
#include "mutter-enum-types.h"
#include "core.h"
@@ -54,6 +53,8 @@
#include
#include
+#include "x11/xprops.h"
+
static char* get_screen_name (MetaDisplay *display,
int number);
diff --git a/src/core/stack.c b/src/core/stack.c
index c088bea62..ce31944d9 100644
--- a/src/core/stack.c
+++ b/src/core/stack.c
@@ -30,12 +30,13 @@
#include "window-private.h"
#include
#include "frame.h"
-#include "group.h"
#include
#include
#include
+#include "x11/group.h"
+
#define WINDOW_HAS_TRANSIENT_TYPE(w) \
(w->type == META_WINDOW_DIALOG || \
w->type == META_WINDOW_MODAL_DIALOG || \
diff --git a/src/core/window-private.h b/src/core/window-private.h
index d5e771423..6b774cb85 100644
--- a/src/core/window-private.h
+++ b/src/core/window-private.h
@@ -38,14 +38,14 @@
#include "screen-private.h"
#include
#include "stack.h"
-#include "iconcache.h"
#include
#include
#include
#include
#include "meta-wayland-types.h"
-#include "group.h"
+#include "x11/iconcache.h"
+#include "x11/group.h"
typedef struct _MetaWindowQueue MetaWindowQueue;
diff --git a/src/core/window.c b/src/core/window.c
index 93a5c0601..d21c704f8 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -28,7 +28,6 @@
#include
#include "window-private.h"
-#include "window-x11.h"
#include "boxes-private.h"
#include "edge-resistance.h"
#include "util-private.h"
@@ -42,9 +41,6 @@
#include "session.h"
#include
#include "resizepopup.h"
-#include "xprops.h"
-#include "group.h"
-#include "window-props.h"
#include "constraints.h"
#include "mutter-enum-types.h"
#include "core.h"
@@ -61,6 +57,11 @@
#include "meta-wayland-private.h"
#include "meta/compositor-mutter.h"
+#include "x11/window-x11.h"
+#include "x11/window-props.h"
+#include "x11/xprops.h"
+#include "x11/group.h"
+
/* Windows that unmaximize to a size bigger than that fraction of the workarea
* will be scaled down to that size (while maintaining aspect ratio).
* Windows that cover an area greater then this size are automaximized on map.