From 9e4315bb502659e73b01eb5b40ce1cac10bea2c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 8 Jun 2023 14:51:32 +0200 Subject: Style: Harmonize header includes in platform ports This applies our existing style guide, and adds a new rule to that style guide for modular components such as platform ports and modules: Includes from the platform port or module should be included with relative paths (relative to the root folder of the modular component, e.g. `platform/linuxbsd/`), in their own section before Godot's "core" includes. The `api` and `export` subfolders also need to be handled as self-contained (and thus use relative paths for their "local" includes) as they are all compiled for each editor platform, without necessarily having the api/export matching platform folder in the include path. E.g. the Linux editor build will compile `platform/android/{api,export}/*.cpp` and those need to use relative includes for it to work. --- platform/linuxbsd/x11/display_server_x11.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'platform/linuxbsd/x11/display_server_x11.cpp') diff --git a/platform/linuxbsd/x11/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp index eada0bf29e..83b6fb7628 100644 --- a/platform/linuxbsd/x11/display_server_x11.cpp +++ b/platform/linuxbsd/x11/display_server_x11.cpp @@ -32,12 +32,13 @@ #ifdef X11_ENABLED +#include "x11/detect_prime_x11.h" +#include "x11/key_mapping_x11.h" + #include "core/config/project_settings.h" #include "core/math/math_funcs.h" #include "core/string/print_string.h" #include "core/string/ustring.h" -#include "detect_prime_x11.h" -#include "key_mapping_x11.h" #include "main/main.h" #include "scene/resources/texture.h" @@ -58,6 +59,9 @@ #include #include +#undef CursorShape +#include + // ICCCM #define WM_NormalState 1L // window normal state #define WM_IconicState 3L // window minimized @@ -65,9 +69,6 @@ #define _NET_WM_STATE_REMOVE 0L // remove/unset property #define _NET_WM_STATE_ADD 1L // add/set property -#undef CursorShape -#include - // 2.2 is the first release with multitouch #define XINPUT_CLIENT_VERSION_MAJOR 2 #define XINPUT_CLIENT_VERSION_MINOR 2 -- cgit v1.2.3