summaryrefslogtreecommitdiffstats
path: root/platform/linuxbsd/x11/display_server_x11.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-06-08 14:51:32 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-06-08 15:19:19 +0200
commit9e4315bb502659e73b01eb5b40ce1cac10bea2c5 (patch)
tree0ba5196ed22da7782480105116134421412ae10a /platform/linuxbsd/x11/display_server_x11.cpp
parent2985a9ac348fc0e08a7906ff36b08985e36ac2a4 (diff)
downloadredot-engine-9e4315bb502659e73b01eb5b40ce1cac10bea2c5.tar.gz
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.
Diffstat (limited to 'platform/linuxbsd/x11/display_server_x11.cpp')
-rw-r--r--platform/linuxbsd/x11/display_server_x11.cpp11
1 files changed, 6 insertions, 5 deletions
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 <sys/types.h>
#include <unistd.h>
+#undef CursorShape
+#include <X11/XKBlib.h>
+
// 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 <X11/XKBlib.h>
-
// 2.2 is the first release with multitouch
#define XINPUT_CLIENT_VERSION_MAJOR 2
#define XINPUT_CLIENT_VERSION_MINOR 2