cleanup: Guard x11 headers includes

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3603>
This commit is contained in:
Bilal Elmoussaoui 2024-02-21 15:09:16 +01:00
parent b5cf16fa74
commit 3cc44b1f04
14 changed files with 20 additions and 12 deletions

View File

@ -66,7 +66,6 @@
#include "backends/meta-remote-access-controller-private.h" #include "backends/meta-remote-access-controller-private.h"
#include "backends/meta-settings-private.h" #include "backends/meta-settings-private.h"
#include "backends/meta-stage-private.h" #include "backends/meta-stage-private.h"
#include "backends/x11/meta-backend-x11.h"
#include "clutter/clutter-mutter.h" #include "clutter/clutter-mutter.h"
#include "clutter/clutter-seat-private.h" #include "clutter/clutter-seat-private.h"
#include "compositor/meta-dnd-private.h" #include "compositor/meta-dnd-private.h"

View File

@ -55,7 +55,6 @@
#include "backends/meta-orientation-manager.h" #include "backends/meta-orientation-manager.h"
#include "backends/meta-output.h" #include "backends/meta-output.h"
#include "backends/meta-virtual-monitor.h" #include "backends/meta-virtual-monitor.h"
#include "backends/x11/meta-monitor-manager-xrandr.h"
#include "clutter/clutter.h" #include "clutter/clutter.h"
#include "core/util-private.h" #include "core/util-private.h"
#include "meta/main.h" #include "meta/main.h"
@ -63,6 +62,10 @@
#include "meta-dbus-display-config.h" #include "meta-dbus-display-config.h"
#ifdef HAVE_X11
#include "backends/x11/meta-monitor-manager-xrandr.h"
#endif
#define DEFAULT_DISPLAY_CONFIGURATION_TIMEOUT 20 #define DEFAULT_DISPLAY_CONFIGURATION_TIMEOUT 20
enum enum

View File

@ -37,7 +37,6 @@
#include "backends/meta-logical-monitor.h" #include "backends/meta-logical-monitor.h"
#include "backends/meta-screen-cast-session.h" #include "backends/meta-screen-cast-session.h"
#include "backends/meta-remote-access-controller-private.h" #include "backends/meta-remote-access-controller-private.h"
#include "backends/x11/meta-backend-x11.h"
#include "cogl/cogl.h" #include "cogl/cogl.h"
#include "core/display-private.h" #include "core/display-private.h"
#include "core/meta-selection-private.h" #include "core/meta-selection-private.h"

View File

@ -25,10 +25,12 @@
#include "compositor/compositor-private.h" #include "compositor/compositor-private.h"
#include "core/display-private.h" #include "core/display-private.h"
#include "backends/meta-dnd-private.h" #include "backends/meta-dnd-private.h"
#ifdef HAVE_X11
#include "backends/x11/meta-backend-x11.h" #include "backends/x11/meta-backend-x11.h"
#include "backends/x11/meta-clutter-backend-x11.h"
#include "backends/x11/meta-stage-x11.h" #include "backends/x11/meta-stage-x11.h"
#include "x11/meta-x11-display-private.h" #include "x11/meta-x11-display-private.h"
#endif
struct _MetaDndClass struct _MetaDndClass
{ {

View File

@ -69,6 +69,7 @@
#include "backends/x11/cm/meta-backend-x11-cm.h" #include "backends/x11/cm/meta-backend-x11-cm.h"
#include "backends/x11/nested/meta-backend-x11-nested.h" #include "backends/x11/nested/meta-backend-x11-nested.h"
#include "compositor/meta-compositor-x11.h" #include "compositor/meta-compositor-x11.h"
#include "meta/group.h"
#include "x11/meta-startup-notification-x11.h" #include "x11/meta-startup-notification-x11.h"
#include "x11/meta-x11-display-private.h" #include "x11/meta-x11-display-private.h"
#include "x11/window-x11.h" #include "x11/window-x11.h"

View File

@ -29,18 +29,25 @@
#include <systemd/sd-login.h> #include <systemd/sd-login.h>
#endif #endif
#include "backends/meta-monitor.h"
#include "backends/meta-monitor-manager-private.h" #include "backends/meta-monitor-manager-private.h"
#include "backends/meta-virtual-monitor.h" #include "backends/meta-virtual-monitor.h"
#include "backends/x11/cm/meta-backend-x11-cm.h"
#include "meta/meta-backend.h" #include "meta/meta-backend.h"
#ifdef HAVE_X11
#include "backends/x11/cm/meta-backend-x11-cm.h"
#include "x11/session.h" #include "x11/session.h"
#endif
#ifdef HAVE_NATIVE_BACKEND #ifdef HAVE_NATIVE_BACKEND
#include "backends/native/meta-backend-native.h" #include "backends/native/meta-backend-native.h"
#endif #endif
#ifdef HAVE_WAYLAND #if defined (HAVE_X11) && defined (HAVE_WAYLAND)
#include "backends/x11/nested/meta-backend-x11-nested.h" #include "backends/x11/nested/meta-backend-x11-nested.h"
#endif
#ifdef HAVE_WAYLAND
#include "wayland/meta-wayland.h" #include "wayland/meta-wayland.h"
#endif #endif

View File

@ -39,7 +39,6 @@
#include "core/prefs-private.h" #include "core/prefs-private.h"
#include "core/util-private.h" #include "core/util-private.h"
#include "meta/prefs.h" #include "meta/prefs.h"
#include "x11/meta-x11-display-private.h"
/* If you add a key, it needs updating in init() and in the gsettings /* If you add a key, it needs updating in init() and in the gsettings
* notify listener and of course in the .schemas file. * notify listener and of course in the .schemas file.

View File

@ -43,7 +43,6 @@
#include "core/display-private.h" #include "core/display-private.h"
#include "core/util-private.h" #include "core/util-private.h"
#include "meta/main.h" #include "meta/main.h"
#include "x11/meta-x11-display-private.h"
static gboolean restart_helper_started = FALSE; static gboolean restart_helper_started = FALSE;
static gboolean restart_message_shown = FALSE; static gboolean restart_message_shown = FALSE;

View File

@ -29,7 +29,6 @@
#include "core/display-private.h" #include "core/display-private.h"
#include "core/startup-notification-private.h" #include "core/startup-notification-private.h"
#include "core/util-private.h" #include "core/util-private.h"
#include "x11/meta-x11-display-private.h"
/* This should be fairly long, as it should never be required unless /* This should be fairly long, as it should never be required unless
* apps or .desktop files are buggy, and it's confusing if * apps or .desktop files are buggy, and it's confusing if

View File

@ -39,7 +39,6 @@
#include "meta/util.h" #include "meta/util.h"
#include "meta/window.h" #include "meta/window.h"
#include "wayland/meta-wayland-types.h" #include "wayland/meta-wayland-types.h"
#include "x11/group-private.h"
typedef struct _MetaWindowQueue MetaWindowQueue; typedef struct _MetaWindowQueue MetaWindowQueue;

View File

@ -82,10 +82,10 @@
#include "meta/meta-cursor-tracker.h" #include "meta/meta-cursor-tracker.h"
#include "meta/meta-enum-types.h" #include "meta/meta-enum-types.h"
#include "meta/prefs.h" #include "meta/prefs.h"
#include "mtk/mtk-x11.h"
#ifdef HAVE_X11_CLIENT #ifdef HAVE_X11_CLIENT
#include "meta/group.h" #include "meta/group.h"
#include "mtk/mtk-x11.h"
#include "x11/meta-x11-display-private.h" #include "x11/meta-x11-display-private.h"
#include "x11/window-props.h" #include "x11/window-props.h"
#include "x11/window-x11-private.h" #include "x11/window-x11-private.h"

View File

@ -46,7 +46,6 @@
#include "core/meta-workspace-manager-private.h" #include "core/meta-workspace-manager-private.h"
#include "core/workspace-private.h" #include "core/workspace-private.h"
#include "meta/prefs.h" #include "meta/prefs.h"
#include "x11/meta-x11-display-private.h"
void meta_workspace_queue_calc_showing (MetaWorkspace *workspace); void meta_workspace_queue_calc_showing (MetaWorkspace *workspace);
static void focus_ancestor_or_mru_window (MetaWorkspace *workspace, static void focus_ancestor_or_mru_window (MetaWorkspace *workspace,

View File

@ -39,6 +39,7 @@
#include "core/meta-workspace-manager-private.h" #include "core/meta-workspace-manager-private.h"
#include "core/window-private.h" #include "core/window-private.h"
#include "core/workspace-private.h" #include "core/workspace-private.h"
#include "meta/group.h"
#include "meta/meta-backend.h" #include "meta/meta-backend.h"
#include "meta/meta-context.h" #include "meta/meta-context.h"
#include "mtk/mtk-x11.h" #include "mtk/mtk-x11.h"

View File

@ -22,6 +22,7 @@
#include "meta/window.h" #include "meta/window.h"
#include <string.h> #include <string.h>
#include <X11/Xutil.h>
#include <X11/extensions/sync.h> #include <X11/extensions/sync.h>
typedef struct typedef struct