diff --git a/autotests/drm/mock_drm.h b/autotests/drm/mock_drm.h
index ae80769777..bba6edfa32 100644
--- a/autotests/drm/mock_drm.h
+++ b/autotests/drm/mock_drm.h
@@ -18,8 +18,8 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*********************************************************************/
#pragma once
-#include
-#include
+#include
+#include
#include
#include
diff --git a/autotests/integration/helper/kill.cpp b/autotests/integration/helper/kill.cpp
index 586806d65d..68647dac3b 100644
--- a/autotests/integration/helper/kill.cpp
+++ b/autotests/integration/helper/kill.cpp
@@ -24,7 +24,7 @@ along with this program. If not, see .
#include
#include
-#include
+#include
int main(int argc, char *argv[])
{
diff --git a/autotests/integration/shell_client_test.cpp b/autotests/integration/shell_client_test.cpp
index 5a10cda006..fd503764ac 100644
--- a/autotests/integration/shell_client_test.cpp
+++ b/autotests/integration/shell_client_test.cpp
@@ -55,7 +55,8 @@ along with this program. If not, see .
#include
#include
#include
-#include
+
+#include
using namespace KWin;
using namespace KWayland::Client;
diff --git a/client.cpp b/client.cpp
index 17799253d1..bd2f0aeba4 100644
--- a/client.cpp
+++ b/client.cpp
@@ -59,7 +59,8 @@ along with this program. If not, see .
#include
// system
#include
-#include
+// c++
+#include
// Put all externs before the namespace statement to allow the linker
// to resolve them properly
diff --git a/colorcorrection/suncalc.cpp b/colorcorrection/suncalc.cpp
index 64cc2cfb0c..217d788b6a 100644
--- a/colorcorrection/suncalc.cpp
+++ b/colorcorrection/suncalc.cpp
@@ -21,7 +21,7 @@ along with this program. If not, see .
#include "constants.h"
#include
-#include
+#include
namespace KWin {
namespace ColorCorrect {
diff --git a/effects.cpp b/effects.cpp
index d269510074..916b71917a 100644
--- a/effects.cpp
+++ b/effects.cpp
@@ -51,7 +51,6 @@ along with this program. If not, see .
#include
-#include
#include "composite.h"
#include "xcbutils.h"
#include "platform.h"
@@ -61,6 +60,8 @@ along with this program. If not, see .
#include "decorations/decorationbridge.h"
#include
+#include
+
namespace KWin
{
//---------------------
diff --git a/effects/cube/cube.cpp b/effects/cube/cube.cpp
index 986c373046..576a000e3f 100644
--- a/effects/cube/cube.cpp
+++ b/effects/cube/cube.cpp
@@ -39,7 +39,7 @@ along with this program. If not, see .
#include
#include
-#include
+#include
#include
#include
diff --git a/effects/cubeslide/cubeslide.cpp b/effects/cubeslide/cubeslide.cpp
index f4725e2915..d3e86eb19e 100644
--- a/effects/cubeslide/cubeslide.cpp
+++ b/effects/cubeslide/cubeslide.cpp
@@ -23,11 +23,11 @@ along with this program. If not, see .
#include "cubeslideconfig.h"
#include
-#include
+#include
-#include
+#include
-#include
+#include
namespace KWin
{
diff --git a/effects/desktopgrid/desktopgrid.cpp b/effects/desktopgrid/desktopgrid.cpp
index 2430544fcd..b162f22dcf 100644
--- a/effects/desktopgrid/desktopgrid.cpp
+++ b/effects/desktopgrid/desktopgrid.cpp
@@ -27,8 +27,6 @@ along with this program. If not, see .
#include "../presentwindows/presentwindows_proxy.h"
#include "../effect_builtins.h"
-#include
-
#include
#include
#include
@@ -44,6 +42,8 @@ along with this program. If not, see .
#include
+#include
+
namespace KWin
{
diff --git a/effects/fallapart/fallapart.cpp b/effects/fallapart/fallapart.cpp
index 20d44f8d58..73f89d34b4 100644
--- a/effects/fallapart/fallapart.cpp
+++ b/effects/fallapart/fallapart.cpp
@@ -21,8 +21,9 @@ along with this program. If not, see .
#include "fallapart.h"
// KConfigSkeleton
#include "fallapartconfig.h"
-#include
-#include
+
+#include
+#include
namespace KWin
{
diff --git a/effects/mouseclick/mouseclick.cpp b/effects/mouseclick/mouseclick.cpp
index 4cf5788a40..baa53f5913 100644
--- a/effects/mouseclick/mouseclick.cpp
+++ b/effects/mouseclick/mouseclick.cpp
@@ -36,7 +36,7 @@ along with this program. If not, see .
#include
-#include
+#include
namespace KWin
{
diff --git a/effects/mousemark/mousemark.cpp b/effects/mousemark/mousemark.cpp
index e969d16bf8..a205ea13c8 100644
--- a/effects/mousemark/mousemark.cpp
+++ b/effects/mousemark/mousemark.cpp
@@ -33,7 +33,7 @@ along with this program. If not, see .
#include
-#include
+#include
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
#include
diff --git a/effects/presentwindows/presentwindows.cpp b/effects/presentwindows/presentwindows.cpp
index b37c771e43..31f19e8c0c 100644
--- a/effects/presentwindows/presentwindows.cpp
+++ b/effects/presentwindows/presentwindows.cpp
@@ -31,9 +31,6 @@ along with this program. If not, see .
#include
#include
-#include
-#include
-#include
#include
#include
#include
@@ -45,6 +42,10 @@ along with this program. If not, see .
#include
#include
+#include
+#include
+#include
+
namespace KWin
{
diff --git a/effects/showfps/showfps.cpp b/effects/showfps/showfps.cpp
index b17aa2342e..8224565e77 100644
--- a/effects/showfps/showfps.cpp
+++ b/effects/showfps/showfps.cpp
@@ -32,11 +32,13 @@ along with this program. If not, see .
#endif
#include
-#include
+
#include
#include
#include
+#include
+
namespace KWin
{
diff --git a/effects/thumbnailaside/thumbnailaside.h b/effects/thumbnailaside/thumbnailaside.h
index bfe4931cd5..ac38ea5b2b 100644
--- a/effects/thumbnailaside/thumbnailaside.h
+++ b/effects/thumbnailaside/thumbnailaside.h
@@ -30,7 +30,7 @@ along with this program. If not, see .
#include
-#include
+#include
namespace KWin
{
diff --git a/effects/touchpoints/touchpoints.cpp b/effects/touchpoints/touchpoints.cpp
index 71a746943a..99063d2744 100644
--- a/effects/touchpoints/touchpoints.cpp
+++ b/effects/touchpoints/touchpoints.cpp
@@ -35,7 +35,7 @@ along with this program. If not, see .
#include
-#include
+#include
namespace KWin
{
diff --git a/effects/trackmouse/trackmouse.cpp b/effects/trackmouse/trackmouse.cpp
index 8a2630089f..534b98f240 100644
--- a/effects/trackmouse/trackmouse.cpp
+++ b/effects/trackmouse/trackmouse.cpp
@@ -37,7 +37,7 @@ along with this program. If not, see .
#include
#include
-#include
+#include
namespace KWin
{
diff --git a/effects/wobblywindows/wobblywindows.cpp b/effects/wobblywindows/wobblywindows.cpp
index 40f543aef3..6dcaeecf91 100644
--- a/effects/wobblywindows/wobblywindows.cpp
+++ b/effects/wobblywindows/wobblywindows.cpp
@@ -12,7 +12,7 @@ License. See the file "COPYING" for the exact licensing terms.
#include "wobblywindows.h"
#include "wobblywindowsconfig.h"
-#include
+#include
//#define COMPUTE_STATS
diff --git a/group.cpp b/group.cpp
index 70bb2bfa93..2183ef8551 100644
--- a/group.cpp
+++ b/group.cpp
@@ -33,11 +33,12 @@ along with this program. If not, see .
#include "client.h"
#include "effects.h"
-#include
#include
#include
#include
+#include
+
/*
TODO
diff --git a/helpers/killer/killer.cpp b/helpers/killer/killer.cpp
index 1dd25ea613..608a91aaf2 100644
--- a/helpers/killer/killer.cpp
+++ b/helpers/killer/killer.cpp
@@ -26,14 +26,15 @@ DEALINGS IN THE SOFTWARE.
#include
#include
#include
-#include
+#include
#include
#include
#include
-#include
-#include
#include
+#include
+#include
+
int main(int argc, char* argv[])
{
KLocalizedString::setApplicationDomain("kwin");
diff --git a/kcmkwin/kwindecoration/declarative-plugin/plugin.cpp b/kcmkwin/kwindecoration/declarative-plugin/plugin.cpp
index 1eb823b52c..54144f5167 100644
--- a/kcmkwin/kwindecoration/declarative-plugin/plugin.cpp
+++ b/kcmkwin/kwindecoration/declarative-plugin/plugin.cpp
@@ -28,8 +28,6 @@
#include
#include
-#include
-
namespace KDecoration2
{
namespace Preview
diff --git a/kcmkwin/kwinoptions/mouse.cpp b/kcmkwin/kwinoptions/mouse.cpp
index 0d9678c305..fd2ca2b681 100644
--- a/kcmkwin/kwinoptions/mouse.cpp
+++ b/kcmkwin/kwinoptions/mouse.cpp
@@ -43,7 +43,7 @@
#include
#include
-#include
+#include
namespace
diff --git a/kcmkwin/kwinrules/ruleslist.cpp b/kcmkwin/kwinrules/ruleslist.cpp
index ae5fc68a39..c1b470414a 100644
--- a/kcmkwin/kwinrules/ruleslist.cpp
+++ b/kcmkwin/kwinrules/ruleslist.cpp
@@ -18,13 +18,14 @@
#include "ruleslist.h"
-#include
#include
#include
#include
#include "ruleswidget.h"
+#include
+
namespace KWin
{
diff --git a/kcmkwin/kwinrules/ruleswidget.cpp b/kcmkwin/kwinrules/ruleswidget.cpp
index 4228820ad2..8354a85bb8 100644
--- a/kcmkwin/kwinrules/ruleswidget.cpp
+++ b/kcmkwin/kwinrules/ruleswidget.cpp
@@ -31,7 +31,6 @@
#include
#endif
-#include
#include
#include
#include
@@ -40,6 +39,8 @@
#include "detectwidget.h"
+#include
+
Q_DECLARE_METATYPE(NET::WindowType)
namespace KWin
diff --git a/kcmkwin/kwinscreenedges/monitor.cpp b/kcmkwin/kwinscreenedges/monitor.cpp
index 543800dffa..d1f0fb0d00 100644
--- a/kcmkwin/kwinscreenedges/monitor.cpp
+++ b/kcmkwin/kwinscreenedges/monitor.cpp
@@ -21,16 +21,16 @@ along with this program. If not, see .
#include "monitor.h"
-#include
#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
namespace KWin
{
diff --git a/kcmkwin/kwinscreenedges/monitor.h b/kcmkwin/kwinscreenedges/monitor.h
index 919937da8b..c40f105730 100644
--- a/kcmkwin/kwinscreenedges/monitor.h
+++ b/kcmkwin/kwinscreenedges/monitor.h
@@ -24,9 +24,9 @@ along with this program. If not, see .
#include "screenpreviewwidget.h"
-#include
-#include
-#include
+#include
+#include
+#include
class QAction;
class QGraphicsView;
diff --git a/layers.cpp b/layers.cpp
index 954da9ef12..07156d9613 100644
--- a/layers.cpp
+++ b/layers.cpp
@@ -79,8 +79,6 @@ along with this program. If not, see .
*/
-#include
-
#include "utils.h"
#include "client.h"
#include "focuschain.h"
@@ -100,6 +98,8 @@ along with this program. If not, see .
#include
+#include
+
namespace KWin
{
diff --git a/libinput/context.cpp b/libinput/context.cpp
index dd11619c3a..d9338247a9 100644
--- a/libinput/context.cpp
+++ b/libinput/context.cpp
@@ -24,9 +24,10 @@ along with this program. If not, see .
#include "../udev.h"
#include
-#include
#include
+#include
+
namespace KWin
{
namespace LibInput
diff --git a/libkwineffects/kwinanimationeffect.h b/libkwineffects/kwinanimationeffect.h
index c8b412867a..0bbe25d74a 100644
--- a/libkwineffects/kwinanimationeffect.h
+++ b/libkwineffects/kwinanimationeffect.h
@@ -24,7 +24,7 @@ along with this program. If not, see .
#include
#include
-#include
+#include
#include
#include
diff --git a/libkwineffects/kwineffects.cpp b/libkwineffects/kwineffects.cpp
index 8f70ba1b33..78f7a2b362 100644
--- a/libkwineffects/kwineffects.cpp
+++ b/libkwineffects/kwineffects.cpp
@@ -27,7 +27,6 @@ along with this program. If not, see .
#include "kwinxrenderutils.h"
#endif
-#include
#include
#include
#include
@@ -37,11 +36,12 @@ along with this program. If not, see .
#include
#include
#include
+#include
#include
#include
-#include
+#include
#include
diff --git a/libkwineffects/kwineffects.h b/libkwineffects/kwineffects.h
index 7b2f3d73b8..6e8b868540 100644
--- a/libkwineffects/kwineffects.h
+++ b/libkwineffects/kwineffects.h
@@ -47,10 +47,10 @@ along with this program. If not, see .
#include
#include
-#include
-#include
#include
+#include
+#include
#include
class KConfigGroup;
diff --git a/libkwineffects/kwinglutils.cpp b/libkwineffects/kwinglutils.cpp
index 5dbcc54f01..b635ea3885 100644
--- a/libkwineffects/kwinglutils.cpp
+++ b/libkwineffects/kwinglutils.cpp
@@ -28,7 +28,6 @@ along with this program. If not, see .
#include "kwinglplatform.h"
#include "logging_p.h"
-
#include
#include
#include
@@ -40,10 +39,9 @@ along with this program. If not, see .
#include
#include
+#include
#include
-#include
-
#define DEBUG_GLRENDERTARGET 0
#ifdef __GNUC__
diff --git a/main.cpp b/main.cpp
index 82061ef8db..943412e7cd 100644
--- a/main.cpp
+++ b/main.cpp
@@ -45,7 +45,7 @@ along with this program. If not, see .
#include
// Qt
#include
-#include
+#include
#include
#include
#include
diff --git a/placement.cpp b/placement.cpp
index 4decbaa614..220f5aae3b 100644
--- a/placement.cpp
+++ b/placement.cpp
@@ -22,11 +22,6 @@ along with this program. If not, see .
#include "placement.h"
-#include
-#include
-
-#include
-
#ifndef KCMRULES
#include "workspace.h"
#include "client.h"
@@ -36,6 +31,11 @@ along with this program. If not, see .
#include "screens.h"
#endif
+#include
+#include
+
+#include
+
namespace KWin
{
diff --git a/plugins/platforms/drm/drm_buffer.cpp b/plugins/platforms/drm/drm_buffer.cpp
index b640c593c2..a5fc83976e 100644
--- a/plugins/platforms/drm/drm_buffer.cpp
+++ b/plugins/platforms/drm/drm_buffer.cpp
@@ -23,7 +23,8 @@ along with this program. If not, see .
// system
#include
-#include
+// c++
+#include
// drm
#include
#include
diff --git a/plugins/platforms/drm/drm_buffer_gbm.cpp b/plugins/platforms/drm/drm_buffer_gbm.cpp
index cbc0d3abd1..136fbb8282 100644
--- a/plugins/platforms/drm/drm_buffer_gbm.cpp
+++ b/plugins/platforms/drm/drm_buffer_gbm.cpp
@@ -25,7 +25,8 @@ along with this program. If not, see .
// system
#include
-#include
+// c++
+#include
// drm
#include
#include
diff --git a/plugins/platforms/drm/drm_output.cpp b/plugins/platforms/drm/drm_output.cpp
index 7c88628bbf..c609aae27d 100644
--- a/plugins/platforms/drm/drm_output.cpp
+++ b/plugins/platforms/drm/drm_output.cpp
@@ -23,8 +23,6 @@ along with this program. If not, see .
#include "drm_object_crtc.h"
#include "drm_object_connector.h"
-#include
-
#include "composite.h"
#include "logind.h"
#include "logging.h"
@@ -42,6 +40,8 @@ along with this program. If not, see .
#include
#include
#include
+// c++
+#include
// drm
#include
#include
diff --git a/plugins/platforms/drm/gbm_surface.h b/plugins/platforms/drm/gbm_surface.h
index 5eaa4c908b..6c3220cbac 100644
--- a/plugins/platforms/drm/gbm_surface.h
+++ b/plugins/platforms/drm/gbm_surface.h
@@ -20,7 +20,7 @@ along with this program. If not, see .
#ifndef KWIN_DRM_GBM_SURFACE_H
#define KWIN_DRM_GBM_SURFACE_H
-#include
+#include
struct gbm_bo;
struct gbm_device;
diff --git a/plugins/platforms/drm/remoteaccess_manager.cpp b/plugins/platforms/drm/remoteaccess_manager.cpp
index 201fd19943..abb0b37ef5 100644
--- a/plugins/platforms/drm/remoteaccess_manager.cpp
+++ b/plugins/platforms/drm/remoteaccess_manager.cpp
@@ -28,7 +28,8 @@ along with this program. If not, see .
#include
#include
#include
-#include
+
+#include
namespace KWin
{
diff --git a/plugins/platforms/x11/common/ge_event_mem_mover.h b/plugins/platforms/x11/common/ge_event_mem_mover.h
index 8b6b96db1f..2b693f409a 100644
--- a/plugins/platforms/x11/common/ge_event_mem_mover.h
+++ b/plugins/platforms/x11/common/ge_event_mem_mover.h
@@ -21,7 +21,7 @@ along with this program. If not, see .
#include
-#include
+#include
namespace KWin
{
diff --git a/plugins/platforms/x11/standalone/glxbackend.cpp b/plugins/platforms/x11/standalone/glxbackend.cpp
index 1d31b447f9..c6579c617a 100644
--- a/plugins/platforms/x11/standalone/glxbackend.cpp
+++ b/plugins/platforms/x11/standalone/glxbackend.cpp
@@ -51,7 +51,7 @@ along with this program. If not, see .
#if HAVE_DL_LIBRARY
#include
#endif
-#include
+#include
#ifndef XCB_GLX_BUFFER_SWAP_COMPLETE
#define XCB_GLX_BUFFER_SWAP_COMPLETE 1
diff --git a/plugins/platforms/x11/standalone/overlaywindow_x11.cpp b/plugins/platforms/x11/standalone/overlaywindow_x11.cpp
index 5a787665fb..c8125a96d6 100644
--- a/plugins/platforms/x11/standalone/overlaywindow_x11.cpp
+++ b/plugins/platforms/x11/standalone/overlaywindow_x11.cpp
@@ -26,10 +26,10 @@ along with this program. If not, see .
#include "utils.h"
#include "xcbutils.h"
-#include "assert.h"
-
#include
+#include
+
#include
#include
#if XCB_COMPOSITE_MAJOR_VERSION > 0 || XCB_COMPOSITE_MINOR_VERSION >= 3
diff --git a/plugins/scenes/opengl/lanczosfilter.cpp b/plugins/scenes/opengl/lanczosfilter.cpp
index c02158dd65..f70c2c12a5 100644
--- a/plugins/scenes/opengl/lanczosfilter.cpp
+++ b/plugins/scenes/opengl/lanczosfilter.cpp
@@ -36,8 +36,8 @@ along with this program. If not, see .
#include
#include
+#include
-#include
#include
namespace KWin
diff --git a/plugins/scenes/opengl/scene_opengl.cpp b/plugins/scenes/opengl/scene_opengl.cpp
index 8da2d358df..6c3a083000 100644
--- a/plugins/scenes/opengl/scene_opengl.cpp
+++ b/plugins/scenes/opengl/scene_opengl.cpp
@@ -53,14 +53,14 @@ along with this program. If not, see .
#include
#include
+#include
#include
-#include
-#include
#include
#include
#include
#include
+#include
#include
#include
#include