From 293b2244ac43a2aef37533b3e6972da179c95d6b Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 13 Jan 2022 15:54:03 +0200 Subject: [PATCH 1/4] Move xcbutils to utils directory --- autotests/integration/activities_test.cpp | 2 +- autotests/integration/debug_console_test.cpp | 2 +- autotests/integration/desktop_window_x11_test.cpp | 2 +- autotests/integration/kwin_wayland_test.cpp | 2 +- autotests/test_client_machine.cpp | 2 +- autotests/test_xcb_size_hints.cpp | 2 +- autotests/test_xcb_window.cpp | 2 +- autotests/test_xcb_wrapper.cpp | 2 +- src/CMakeLists.txt | 2 +- src/atoms.h | 2 +- src/backends/x11/common/eglonxbackend.cpp | 2 +- src/backends/x11/standalone/edge.h | 2 +- src/backends/x11/standalone/effects_x11.h | 2 +- src/backends/x11/standalone/glxbackend.cpp | 2 +- src/backends/x11/standalone/non_composited_outline.h | 2 +- src/backends/x11/standalone/overlaywindow_x11.cpp | 2 +- src/backends/x11/standalone/windowselector.cpp | 2 +- src/backends/x11/standalone/x11_platform.cpp | 2 +- src/backends/x11/standalone/x11cursor.cpp | 2 +- src/backends/x11/standalone/xfixes_cursor_event_filter.cpp | 2 +- src/backends/x11/windowed/x11windowed_backend.cpp | 2 +- src/composite.cpp | 2 +- src/cursor.cpp | 2 +- src/effects.cpp | 2 +- src/events.cpp | 2 +- src/main.cpp | 2 +- src/main_x11.cpp | 2 +- src/scenes/opengl/lanczosfilter.cpp | 4 ---- src/syncalarmx11filter.cpp | 2 +- src/tabbox/tabbox.cpp | 2 +- src/tabbox/tabboxhandler.cpp | 2 +- src/toplevel.h | 2 +- src/unmanaged.cpp | 1 - src/utils/CMakeLists.txt | 3 +++ src/{ => utils}/xcbutils.cpp | 2 +- src/{ => utils}/xcbutils.h | 0 src/workspace.cpp | 2 +- src/x11client.h | 2 +- src/xwl/selection.cpp | 2 +- src/xwl/xwayland.cpp | 2 +- tests/screenedgeshowtest.cpp | 2 +- tests/x11shadowreader.cpp | 2 +- 42 files changed, 41 insertions(+), 43 deletions(-) create mode 100644 src/utils/CMakeLists.txt rename src/{ => utils}/xcbutils.cpp (99%) rename src/{ => utils}/xcbutils.h (100%) diff --git a/autotests/integration/activities_test.cpp b/autotests/integration/activities_test.cpp index 1f258bf32a..4d723696d6 100644 --- a/autotests/integration/activities_test.cpp +++ b/autotests/integration/activities_test.cpp @@ -17,7 +17,7 @@ #include "screens.h" #include "wayland_server.h" #include "workspace.h" -#include "xcbutils.h" +#include "utils/xcbutils.h" #include #include diff --git a/autotests/integration/debug_console_test.cpp b/autotests/integration/debug_console_test.cpp index 3ce47486c0..21de7bdf2c 100644 --- a/autotests/integration/debug_console_test.cpp +++ b/autotests/integration/debug_console_test.cpp @@ -15,7 +15,7 @@ #include "screens.h" #include "wayland_server.h" #include "workspace.h" -#include "xcbutils.h" +#include "utils/xcbutils.h" #include #include diff --git a/autotests/integration/desktop_window_x11_test.cpp b/autotests/integration/desktop_window_x11_test.cpp index 262ca8dae3..45a77b1c93 100644 --- a/autotests/integration/desktop_window_x11_test.cpp +++ b/autotests/integration/desktop_window_x11_test.cpp @@ -17,7 +17,7 @@ #include "screens.h" #include "wayland_server.h" #include "workspace.h" -#include "xcbutils.h" +#include "utils/xcbutils.h" #include #include diff --git a/autotests/integration/kwin_wayland_test.cpp b/autotests/integration/kwin_wayland_test.cpp index 4d4e79d903..c23f8fa1d7 100644 --- a/autotests/integration/kwin_wayland_test.cpp +++ b/autotests/integration/kwin_wayland_test.cpp @@ -15,7 +15,7 @@ #include "pluginmanager.h" #include "wayland_server.h" #include "workspace.h" -#include "xcbutils.h" +#include "utils/xcbutils.h" #include "xwl/xwayland.h" #include diff --git a/autotests/test_client_machine.cpp b/autotests/test_client_machine.cpp index d057bfc720..5aff04cff3 100644 --- a/autotests/test_client_machine.cpp +++ b/autotests/test_client_machine.cpp @@ -9,7 +9,7 @@ #include "testutils.h" // KWin #include "client_machine.h" -#include "xcbutils.h" +#include "utils/xcbutils.h" // Qt #include #include diff --git a/autotests/test_xcb_size_hints.cpp b/autotests/test_xcb_size_hints.cpp index c8dd001ffb..dfc090389c 100644 --- a/autotests/test_xcb_size_hints.cpp +++ b/autotests/test_xcb_size_hints.cpp @@ -8,7 +8,7 @@ */ #include "testutils.h" // KWin -#include "xcbutils.h" +#include "utils/xcbutils.h" // Qt #include #include diff --git a/autotests/test_xcb_window.cpp b/autotests/test_xcb_window.cpp index a419458f5a..d9feed5780 100644 --- a/autotests/test_xcb_window.cpp +++ b/autotests/test_xcb_window.cpp @@ -8,7 +8,7 @@ */ #include "testutils.h" // KWin -#include "xcbutils.h" +#include "utils/xcbutils.h" // Qt #include #include diff --git a/autotests/test_xcb_wrapper.cpp b/autotests/test_xcb_wrapper.cpp index 521dc88250..9aa4abaaa1 100644 --- a/autotests/test_xcb_wrapper.cpp +++ b/autotests/test_xcb_wrapper.cpp @@ -8,7 +8,7 @@ */ #include "testutils.h" // KWin -#include "xcbutils.h" +#include "utils/xcbutils.h" // Qt #include #include diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0bbfb3513d..2059f90bd5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -151,7 +151,6 @@ target_sources(kwin PRIVATE x11client.cpp x11eventfilter.cpp x11syncmanager.cpp - xcbutils.cpp xcursortheme.cpp xdgactivationv1.cpp xdgshellclient.cpp @@ -239,6 +238,7 @@ target_sources(kwin PRIVATE add_subdirectory(backends) add_subdirectory(scenes) +add_subdirectory(utils) if (KWIN_BUILD_CMS) target_sources(kwin PRIVATE diff --git a/src/atoms.h b/src/atoms.h index 6b5a82dcb0..72321ce9c4 100644 --- a/src/atoms.h +++ b/src/atoms.h @@ -12,7 +12,7 @@ #ifndef KWIN_ATOMS_H #define KWIN_ATOMS_H -#include "xcbutils.h" +#include "utils/xcbutils.h" namespace KWin { diff --git a/src/backends/x11/common/eglonxbackend.cpp b/src/backends/x11/common/eglonxbackend.cpp index a94b27411e..c57129750b 100644 --- a/src/backends/x11/common/eglonxbackend.cpp +++ b/src/backends/x11/common/eglonxbackend.cpp @@ -14,7 +14,7 @@ #include "options.h" #include "overlaywindow.h" #include "platform.h" -#include "xcbutils.h" +#include "utils/xcbutils.h" // Qt #include #include diff --git a/src/backends/x11/standalone/edge.h b/src/backends/x11/standalone/edge.h index ae1d83db36..a541140422 100644 --- a/src/backends/x11/standalone/edge.h +++ b/src/backends/x11/standalone/edge.h @@ -18,7 +18,7 @@ #ifndef KWIN_EDGE_H #define KWIN_EDGE_H #include "screenedge.h" -#include "xcbutils.h" +#include "utils/xcbutils.h" namespace KWin { diff --git a/src/backends/x11/standalone/effects_x11.h b/src/backends/x11/standalone/effects_x11.h index 7e442243d0..8ed50bd95c 100644 --- a/src/backends/x11/standalone/effects_x11.h +++ b/src/backends/x11/standalone/effects_x11.h @@ -11,7 +11,7 @@ #define KWIN_EFFECTS_X11_H #include "effects.h" -#include "xcbutils.h" +#include "utils/xcbutils.h" #include diff --git a/src/backends/x11/standalone/glxbackend.cpp b/src/backends/x11/standalone/glxbackend.cpp index 71e92229c3..653c4342b8 100644 --- a/src/backends/x11/standalone/glxbackend.cpp +++ b/src/backends/x11/standalone/glxbackend.cpp @@ -29,7 +29,7 @@ #include "scene.h" #include "screens.h" #include "surfaceitem_x11.h" -#include "xcbutils.h" +#include "utils/xcbutils.h" // kwin libs #include #include diff --git a/src/backends/x11/standalone/non_composited_outline.h b/src/backends/x11/standalone/non_composited_outline.h index 6b3f1a137d..52e863c0e6 100644 --- a/src/backends/x11/standalone/non_composited_outline.h +++ b/src/backends/x11/standalone/non_composited_outline.h @@ -9,7 +9,7 @@ #ifndef KWIN_NON_COMPOSITED_OUTLINE_H #define KWIN_NON_COMPOSITED_OUTLINE_H #include "outline.h" -#include "xcbutils.h" +#include "utils/xcbutils.h" namespace KWin { diff --git a/src/backends/x11/standalone/overlaywindow_x11.cpp b/src/backends/x11/standalone/overlaywindow_x11.cpp index 7917205f56..60f4630dc6 100644 --- a/src/backends/x11/standalone/overlaywindow_x11.cpp +++ b/src/backends/x11/standalone/overlaywindow_x11.cpp @@ -14,7 +14,7 @@ #include "scene.h" #include "screens.h" #include "utils.h" -#include "xcbutils.h" +#include "utils/xcbutils.h" #include diff --git a/src/backends/x11/standalone/windowselector.cpp b/src/backends/x11/standalone/windowselector.cpp index 1cfd0e0a28..545e02cf44 100644 --- a/src/backends/x11/standalone/windowselector.cpp +++ b/src/backends/x11/standalone/windowselector.cpp @@ -13,7 +13,7 @@ #include "cursor.h" #include "unmanaged.h" #include "workspace.h" -#include "xcbutils.h" +#include "utils/xcbutils.h" // XLib #include #include diff --git a/src/backends/x11/standalone/x11_platform.cpp b/src/backends/x11/standalone/x11_platform.cpp index c47d73b4cd..ec8809a6e5 100644 --- a/src/backends/x11/standalone/x11_platform.cpp +++ b/src/backends/x11/standalone/x11_platform.cpp @@ -31,7 +31,7 @@ #include "non_composited_outline.h" #include "workspace.h" #include "x11_output.h" -#include "xcbutils.h" +#include "utils/xcbutils.h" #include "renderloop.h" #include diff --git a/src/backends/x11/standalone/x11cursor.cpp b/src/backends/x11/standalone/x11cursor.cpp index 7529a1852e..3675fb1d08 100644 --- a/src/backends/x11/standalone/x11cursor.cpp +++ b/src/backends/x11/standalone/x11cursor.cpp @@ -10,7 +10,7 @@ #include "input.h" #include "keyboard_input.h" #include "utils.h" -#include "xcbutils.h" +#include "utils/xcbutils.h" #include "xfixes_cursor_event_filter.h" #include diff --git a/src/backends/x11/standalone/xfixes_cursor_event_filter.cpp b/src/backends/x11/standalone/xfixes_cursor_event_filter.cpp index aa04ed05d8..abe5e6d757 100644 --- a/src/backends/x11/standalone/xfixes_cursor_event_filter.cpp +++ b/src/backends/x11/standalone/xfixes_cursor_event_filter.cpp @@ -8,7 +8,7 @@ */ #include "xfixes_cursor_event_filter.h" #include "x11cursor.h" -#include "xcbutils.h" +#include "utils/xcbutils.h" namespace KWin { diff --git a/src/backends/x11/windowed/x11windowed_backend.cpp b/src/backends/x11/windowed/x11windowed_backend.cpp index 8d1d2e0e65..444fb7cda3 100644 --- a/src/backends/x11/windowed/x11windowed_backend.cpp +++ b/src/backends/x11/windowed/x11windowed_backend.cpp @@ -12,7 +12,7 @@ #include "scene_qpainter_x11_backend.h" #include "logging.h" #include "wayland_server.h" -#include "xcbutils.h" +#include "utils/xcbutils.h" #include "egl_x11_backend.h" #include "screens.h" #include "session.h" diff --git a/src/composite.cpp b/src/composite.cpp index 85808b1397..43859cf22c 100644 --- a/src/composite.cpp +++ b/src/composite.cpp @@ -32,7 +32,7 @@ #include "wayland_server.h" #include "workspace.h" #include "x11syncmanager.h" -#include "xcbutils.h" +#include "utils/xcbutils.h" #include #include diff --git a/src/cursor.cpp b/src/cursor.cpp index 9371fadd53..8634a76579 100644 --- a/src/cursor.cpp +++ b/src/cursor.cpp @@ -14,7 +14,7 @@ #include "main.h" #include "platform.h" #include "utils.h" -#include "xcbutils.h" +#include "utils/xcbutils.h" #include "abstract_output.h" #include "composite.h" #include "scene.h" diff --git a/src/effects.cpp b/src/effects.cpp index 143dac77c3..1be036079f 100644 --- a/src/effects.cpp +++ b/src/effects.cpp @@ -46,8 +46,8 @@ #include #include "composite.h" -#include "xcbutils.h" #include "platform.h" +#include "utils/xcbutils.h" #include "waylandclient.h" #include "wayland_server.h" diff --git a/src/events.cpp b/src/events.cpp index deaa756e9d..c09f615af9 100644 --- a/src/events.cpp +++ b/src/events.cpp @@ -30,7 +30,7 @@ #include "effects.h" #include "screenedge.h" #include "screens.h" -#include "xcbutils.h" +#include "utils/xcbutils.h" #include diff --git a/src/main.cpp b/src/main.cpp index 378dc98b34..086c982f58 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -24,9 +24,9 @@ #include "screens.h" #include "screenlockerwatcher.h" #include "sm.h" +#include "utils/xcbutils.h" #include "workspace.h" #include "x11eventfilter.h" -#include "xcbutils.h" #include diff --git a/src/main_x11.cpp b/src/main_x11.cpp index 5b8170d6cd..03535831f6 100644 --- a/src/main_x11.cpp +++ b/src/main_x11.cpp @@ -15,7 +15,7 @@ #include "platform.h" #include "sm.h" #include "workspace.h" -#include "xcbutils.h" +#include "utils/xcbutils.h" #include #include diff --git a/src/scenes/opengl/lanczosfilter.cpp b/src/scenes/opengl/lanczosfilter.cpp index d275e65aaf..afd7207715 100644 --- a/src/scenes/opengl/lanczosfilter.cpp +++ b/src/scenes/opengl/lanczosfilter.cpp @@ -9,12 +9,8 @@ */ #include "lanczosfilter.h" -#include "x11client.h" -#include "deleted.h" #include "effects.h" -#include "unmanaged.h" #include "options.h" -#include "utils.h" #include "workspace.h" #include diff --git a/src/syncalarmx11filter.cpp b/src/syncalarmx11filter.cpp index 64ee66bfbc..8678767ca4 100644 --- a/src/syncalarmx11filter.cpp +++ b/src/syncalarmx11filter.cpp @@ -10,7 +10,7 @@ #include "syncalarmx11filter.h" #include "workspace.h" #include "x11client.h" -#include "xcbutils.h" +#include "utils/xcbutils.h" namespace KWin { diff --git a/src/tabbox/tabbox.cpp b/src/tabbox/tabbox.cpp index 8f8fadcc33..a1c50b27fc 100644 --- a/src/tabbox/tabbox.cpp +++ b/src/tabbox/tabbox.cpp @@ -36,7 +36,7 @@ #include "unmanaged.h" #include "virtualdesktops.h" #include "workspace.h" -#include "xcbutils.h" +#include "utils/xcbutils.h" // Qt #include #include diff --git a/src/tabbox/tabboxhandler.cpp b/src/tabbox/tabboxhandler.cpp index 494699af17..5e5de4efb4 100644 --- a/src/tabbox/tabboxhandler.cpp +++ b/src/tabbox/tabboxhandler.cpp @@ -11,7 +11,7 @@ #include "tabboxhandler.h" #include #include -#include "xcbutils.h" +#include "utils/xcbutils.h" // tabbox #include "clientmodel.h" #include "desktopmodel.h" diff --git a/src/toplevel.h b/src/toplevel.h index 2ad992b7e1..256fdb4253 100644 --- a/src/toplevel.h +++ b/src/toplevel.h @@ -12,7 +12,7 @@ // kwin #include "utils.h" -#include "xcbutils.h" +#include "utils/xcbutils.h" // KDE #include // Qt diff --git a/src/unmanaged.cpp b/src/unmanaged.cpp index 5d83230186..5cad066a72 100644 --- a/src/unmanaged.cpp +++ b/src/unmanaged.cpp @@ -14,7 +14,6 @@ #include "deleted.h" #include "surfaceitem_x11.h" #include "utils.h" -#include "xcbutils.h" #include #include diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt new file mode 100644 index 0000000000..7b5baeec48 --- /dev/null +++ b/src/utils/CMakeLists.txt @@ -0,0 +1,3 @@ +target_sources(kwin PRIVATE + xcbutils.cpp +) diff --git a/src/xcbutils.cpp b/src/utils/xcbutils.cpp similarity index 99% rename from src/xcbutils.cpp rename to src/utils/xcbutils.cpp index dae4713765..7563281a3b 100644 --- a/src/xcbutils.cpp +++ b/src/utils/xcbutils.cpp @@ -7,7 +7,7 @@ SPDX-License-Identifier: GPL-2.0-or-later */ -#include "xcbutils.h" +#include "utils/xcbutils.h" #include "utils.h" // Qt #include diff --git a/src/xcbutils.h b/src/utils/xcbutils.h similarity index 100% rename from src/xcbutils.h rename to src/utils/xcbutils.h diff --git a/src/workspace.cpp b/src/workspace.cpp index 07222a79ac..e4e3e19728 100644 --- a/src/workspace.cpp +++ b/src/workspace.cpp @@ -49,7 +49,7 @@ #include "virtualdesktops.h" #include "was_user_interaction_x11_filter.h" #include "wayland_server.h" -#include "xcbutils.h" +#include "utils/xcbutils.h" #include "main.h" #include "decorations/decorationbridge.h" #include "xwaylandclient.h" diff --git a/src/x11client.h b/src/x11client.h index 53ad7ba418..b523044d3d 100644 --- a/src/x11client.h +++ b/src/x11client.h @@ -13,7 +13,7 @@ // kwin #include "decorationitem.h" #include "abstract_client.h" -#include "xcbutils.h" +#include "utils/xcbutils.h" // Qt #include #include diff --git a/src/xwl/selection.cpp b/src/xwl/selection.cpp index 64a5f3c0a4..2866088f61 100644 --- a/src/xwl/selection.cpp +++ b/src/xwl/selection.cpp @@ -12,9 +12,9 @@ #include "transfer.h" #include "atoms.h" +#include "utils/xcbutils.h" #include "workspace.h" #include "x11client.h" -#include "xcbutils.h" #include #include diff --git a/src/xwl/xwayland.cpp b/src/xwl/xwayland.cpp index 3aeb1c7345..ed41a4e6f7 100644 --- a/src/xwl/xwayland.cpp +++ b/src/xwl/xwayland.cpp @@ -19,8 +19,8 @@ #include "options.h" #include "utils.h" #include "platform.h" +#include "utils/xcbutils.h" #include "wayland_server.h" -#include "xcbutils.h" #include "xwayland_logging.h" #include "xwaylandsocket.h" diff --git a/tests/screenedgeshowtest.cpp b/tests/screenedgeshowtest.cpp index 2bf41701f3..109aacd2d0 100644 --- a/tests/screenedgeshowtest.cpp +++ b/tests/screenedgeshowtest.cpp @@ -3,7 +3,7 @@ SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#include "xcbutils.h" +#include "utils/xcbutils.h" #include #include diff --git a/tests/x11shadowreader.cpp b/tests/x11shadowreader.cpp index 2050ad40fd..abd6f40eff 100644 --- a/tests/x11shadowreader.cpp +++ b/tests/x11shadowreader.cpp @@ -3,7 +3,7 @@ SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ -#include "xcbutils.h" +#include "utils/xcbutils.h" #include #include -- GitLab From 0e1d65d5a27340ba5a5e1c8368b665403e51e261 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 13 Jan 2022 16:02:41 +0200 Subject: [PATCH 2/4] Move opengl context attribute builders to utils directory --- autotests/CMakeLists.txt | 4 ++-- autotests/opengl_context_attribute_builder_test.cpp | 4 ++-- src/CMakeLists.txt | 2 -- src/backends/x11/standalone/glx_context_attribute_builder.h | 2 +- src/effects/screenshot/screenshotdbusinterface1.cpp | 2 +- src/effects/screenshot/screenshotdbusinterface2.cpp | 2 +- src/platformsupport/scenes/opengl/abstract_egl_backend.cpp | 2 +- src/plugins/qpa/eglplatformcontext.cpp | 2 +- src/utils/CMakeLists.txt | 2 ++ src/{ => utils}/abstract_opengl_context_attribute_builder.cpp | 0 src/{ => utils}/abstract_opengl_context_attribute_builder.h | 0 src/{ => utils}/egl_context_attribute_builder.cpp | 0 src/{ => utils}/egl_context_attribute_builder.h | 0 src/{service_utils.h => utils/serviceutils.h} | 0 src/wayland_server.cpp | 2 +- 15 files changed, 12 insertions(+), 12 deletions(-) rename src/{ => utils}/abstract_opengl_context_attribute_builder.cpp (100%) rename src/{ => utils}/abstract_opengl_context_attribute_builder.h (100%) rename src/{ => utils}/egl_context_attribute_builder.cpp (100%) rename src/{ => utils}/egl_context_attribute_builder.h (100%) rename src/{service_utils.h => utils/serviceutils.h} (100%) diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt index 0a08fce8cf..17800c0288 100644 --- a/autotests/CMakeLists.txt +++ b/autotests/CMakeLists.txt @@ -186,8 +186,8 @@ add_test(NAME kwin-testX11TimestampUpdate COMMAND testX11TimestampUpdate) ecm_mark_as_test(testX11TimestampUpdate) set(testOpenGLContextAttributeBuilder_SRCS - ../src/abstract_opengl_context_attribute_builder.cpp - ../src/egl_context_attribute_builder.cpp + ../src/utils/abstract_opengl_context_attribute_builder.cpp + ../src/utils/egl_context_attribute_builder.cpp opengl_context_attribute_builder_test.cpp ) diff --git a/autotests/opengl_context_attribute_builder_test.cpp b/autotests/opengl_context_attribute_builder_test.cpp index 0ccf1942d9..1002c23344 100644 --- a/autotests/opengl_context_attribute_builder_test.cpp +++ b/autotests/opengl_context_attribute_builder_test.cpp @@ -6,8 +6,8 @@ SPDX-License-Identifier: GPL-2.0-or-later */ -#include "abstract_opengl_context_attribute_builder.h" -#include "egl_context_attribute_builder.h" +#include "utils/abstract_opengl_context_attribute_builder.h" +#include "utils/egl_context_attribute_builder.h" #include #include diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2059f90bd5..69ae727436 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -28,7 +28,6 @@ set_target_properties(kwin PROPERTIES target_sources(kwin PRIVATE 3rdparty/xcursor.c abstract_client.cpp - abstract_opengl_context_attribute_builder.cpp abstract_output.cpp abstract_wayland_output.cpp activation.cpp @@ -50,7 +49,6 @@ target_sources(kwin PRIVATE dpmsinputeventfilter.cpp effectloader.cpp effects.cpp - egl_context_attribute_builder.cpp events.cpp focuschain.cpp ftrace.cpp diff --git a/src/backends/x11/standalone/glx_context_attribute_builder.h b/src/backends/x11/standalone/glx_context_attribute_builder.h index 460f519b28..b636c7e69a 100644 --- a/src/backends/x11/standalone/glx_context_attribute_builder.h +++ b/src/backends/x11/standalone/glx_context_attribute_builder.h @@ -7,7 +7,7 @@ SPDX-License-Identifier: GPL-2.0-or-later */ #pragma once -#include "abstract_opengl_context_attribute_builder.h" +#include "utils/abstract_opengl_context_attribute_builder.h" namespace KWin { diff --git a/src/effects/screenshot/screenshotdbusinterface1.cpp b/src/effects/screenshot/screenshotdbusinterface1.cpp index fd642bab90..1bc056c9db 100644 --- a/src/effects/screenshot/screenshotdbusinterface1.cpp +++ b/src/effects/screenshot/screenshotdbusinterface1.cpp @@ -7,7 +7,7 @@ #include "screenshotdbusinterface1.h" #include "screenshotlogging.h" -#include "../service_utils.h" +#include "utils/serviceutils.h" #include #include diff --git a/src/effects/screenshot/screenshotdbusinterface2.cpp b/src/effects/screenshot/screenshotdbusinterface2.cpp index 9a7abe7669..b8c7a4da5e 100644 --- a/src/effects/screenshot/screenshotdbusinterface2.cpp +++ b/src/effects/screenshot/screenshotdbusinterface2.cpp @@ -7,9 +7,9 @@ */ #include "screenshotdbusinterface2.h" -#include "../service_utils.h" #include "screenshot2adaptor.h" #include "screenshotlogging.h" +#include "utils/serviceutils.h" #include diff --git a/src/platformsupport/scenes/opengl/abstract_egl_backend.cpp b/src/platformsupport/scenes/opengl/abstract_egl_backend.cpp index d7c09fce82..8c7eff37b5 100644 --- a/src/platformsupport/scenes/opengl/abstract_egl_backend.cpp +++ b/src/platformsupport/scenes/opengl/abstract_egl_backend.cpp @@ -9,9 +9,9 @@ #include "abstract_egl_backend.h" #include "egl_dmabuf.h" #include "composite.h" -#include "egl_context_attribute_builder.h" #include "options.h" #include "platform.h" +#include "utils/egl_context_attribute_builder.h" #include "wayland_server.h" #include "abstract_wayland_output.h" #include diff --git a/src/plugins/qpa/eglplatformcontext.cpp b/src/plugins/qpa/eglplatformcontext.cpp index f30e0ff028..dfa16a7310 100644 --- a/src/plugins/qpa/eglplatformcontext.cpp +++ b/src/plugins/qpa/eglplatformcontext.cpp @@ -9,11 +9,11 @@ */ #include "eglplatformcontext.h" -#include "egl_context_attribute_builder.h" #include "eglhelpers.h" #include "internal_client.h" #include "offscreensurface.h" #include "platform.h" +#include "utils/egl_context_attribute_builder.h" #include "window.h" #include "logging.h" diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt index 7b5baeec48..af238aa699 100644 --- a/src/utils/CMakeLists.txt +++ b/src/utils/CMakeLists.txt @@ -1,3 +1,5 @@ target_sources(kwin PRIVATE + abstract_opengl_context_attribute_builder.cpp + egl_context_attribute_builder.cpp xcbutils.cpp ) diff --git a/src/abstract_opengl_context_attribute_builder.cpp b/src/utils/abstract_opengl_context_attribute_builder.cpp similarity index 100% rename from src/abstract_opengl_context_attribute_builder.cpp rename to src/utils/abstract_opengl_context_attribute_builder.cpp diff --git a/src/abstract_opengl_context_attribute_builder.h b/src/utils/abstract_opengl_context_attribute_builder.h similarity index 100% rename from src/abstract_opengl_context_attribute_builder.h rename to src/utils/abstract_opengl_context_attribute_builder.h diff --git a/src/egl_context_attribute_builder.cpp b/src/utils/egl_context_attribute_builder.cpp similarity index 100% rename from src/egl_context_attribute_builder.cpp rename to src/utils/egl_context_attribute_builder.cpp diff --git a/src/egl_context_attribute_builder.h b/src/utils/egl_context_attribute_builder.h similarity index 100% rename from src/egl_context_attribute_builder.h rename to src/utils/egl_context_attribute_builder.h diff --git a/src/service_utils.h b/src/utils/serviceutils.h similarity index 100% rename from src/service_utils.h rename to src/utils/serviceutils.h diff --git a/src/wayland_server.cpp b/src/wayland_server.cpp index 8bbbda4462..e2e451e56c 100644 --- a/src/wayland_server.cpp +++ b/src/wayland_server.cpp @@ -21,8 +21,8 @@ #include "workspace.h" #include "xdgshellclient.h" #include "xdgactivationv1.h" -#include "service_utils.h" #include "unmanaged.h" +#include "utils/serviceutils.h" #include "waylandoutput.h" #include "waylandoutputdevicev2.h" #include "virtualdesktops.h" -- GitLab From 8dd1d8631099246dc8b98b0643c4df65d16ef72b Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sat, 15 Jan 2022 13:20:16 +0200 Subject: [PATCH 3/4] Move SubSurfaceMonitor to utils directory --- src/CMakeLists.txt | 1 - src/debug_console.cpp | 2 +- src/utils/CMakeLists.txt | 1 + src/{ => utils}/subsurfacemonitor.cpp | 0 src/{ => utils}/subsurfacemonitor.h | 0 src/xdgshellclient.cpp | 10 +++++----- 6 files changed, 7 insertions(+), 7 deletions(-) rename src/{ => utils}/subsurfacemonitor.cpp (100%) rename src/{ => utils}/subsurfacemonitor.h (100%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 69ae727436..483c583886 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -119,7 +119,6 @@ target_sources(kwin PRIVATE shadow.cpp shadowitem.cpp sm.cpp - subsurfacemonitor.cpp surfaceitem.cpp surfaceitem_internal.cpp surfaceitem_wayland.cpp diff --git a/src/debug_console.cpp b/src/debug_console.cpp index ea6fe677e6..e76a653853 100644 --- a/src/debug_console.cpp +++ b/src/debug_console.cpp @@ -14,8 +14,8 @@ #include "keyboard_input.h" #include "main.h" #include "scene.h" -#include "subsurfacemonitor.h" #include "unmanaged.h" +#include "utils/subsurfacemonitor.h" #include "wayland_server.h" #include "waylandclient.h" #include "workspace.h" diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt index af238aa699..72cd8fdb36 100644 --- a/src/utils/CMakeLists.txt +++ b/src/utils/CMakeLists.txt @@ -1,5 +1,6 @@ target_sources(kwin PRIVATE abstract_opengl_context_attribute_builder.cpp egl_context_attribute_builder.cpp + subsurfacemonitor.cpp xcbutils.cpp ) diff --git a/src/subsurfacemonitor.cpp b/src/utils/subsurfacemonitor.cpp similarity index 100% rename from src/subsurfacemonitor.cpp rename to src/utils/subsurfacemonitor.cpp diff --git a/src/subsurfacemonitor.h b/src/utils/subsurfacemonitor.h similarity index 100% rename from src/subsurfacemonitor.h rename to src/utils/subsurfacemonitor.h diff --git a/src/xdgshellclient.cpp b/src/xdgshellclient.cpp index b1934c4a88..5ac6776cc7 100644 --- a/src/xdgshellclient.cpp +++ b/src/xdgshellclient.cpp @@ -10,18 +10,18 @@ */ #include "xdgshellclient.h" #include "abstract_wayland_output.h" +#if KWIN_BUILD_ACTIVITIES +#include "activities.h" +#endif #include "decorations/decorationbridge.h" #include "deleted.h" #include "platform.h" #include "screenedge.h" -#include "subsurfacemonitor.h" +#include "touch_input.h" +#include "utils/subsurfacemonitor.h" #include "virtualdesktops.h" #include "wayland_server.h" #include "workspace.h" -#if KWIN_BUILD_ACTIVITIES -#include "activities.h" -#endif -#include "touch_input.h" #include #include -- GitLab From e2a393ce2d36c99bcd265e44982bda6a4db304bc Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 18 Jan 2022 10:35:52 +0200 Subject: [PATCH 4/4] Move utils.h file to utils directory --- autotests/test_x11_timestamp_update.cpp | 2 +- src/CMakeLists.txt | 1 - src/abstract_wayland_output.h | 2 +- src/backends/drm/egl_gbm_backend.h | 2 +- src/backends/drm/scene_qpainter_drm_backend.h | 2 +- src/backends/wayland/egl_wayland_backend.h | 2 +- src/backends/wayland/scene_qpainter_wayland_backend.h | 2 +- .../x11/standalone/effects_mouse_interception_x11_filter.cpp | 2 +- src/backends/x11/standalone/effects_x11.cpp | 2 +- src/backends/x11/standalone/eglbackend.h | 2 +- src/backends/x11/standalone/glxbackend.h | 2 +- src/backends/x11/standalone/overlaywindow_x11.cpp | 2 +- src/backends/x11/standalone/x11cursor.cpp | 2 +- src/client_machine.cpp | 2 +- src/colordevice.cpp | 2 +- src/colormanager.cpp | 2 +- src/composite.cpp | 2 +- src/cursor.cpp | 2 +- src/decorationitem.cpp | 2 +- src/effectloader.cpp | 2 +- src/globalshortcuts.cpp | 2 +- src/group.h | 2 +- src/inputmethod.cpp | 2 +- src/item.cpp | 2 +- src/kcmkwin/kwinrules/CMakeLists.txt | 2 +- src/keyboard_input.cpp | 2 +- src/layers.cpp | 2 +- src/options.cpp | 2 +- src/outline.cpp | 2 +- .../scenes/opengl/basiceglsurfacetexture_internal.cpp | 2 +- .../scenes/opengl/basiceglsurfacetexture_wayland.cpp | 2 +- src/platformsupport/scenes/opengl/egl_dmabuf.cpp | 2 +- src/platformsupport/scenes/opengl/openglbackend.cpp | 2 +- src/platformsupport/scenes/qpainter/qpainterbackend.cpp | 2 +- .../scenes/qpainter/qpaintersurfacetexture_wayland.cpp | 2 +- src/pluginmanager.cpp | 2 +- src/plugins/screencast/screencaststream.cpp | 2 +- src/renderloop.cpp | 2 +- src/rules.h | 2 +- src/scene.h | 2 +- src/scenes/opengl/scene_opengl.cpp | 2 +- src/screenedge.cpp | 2 +- src/screens.cpp | 2 +- src/session_consolekit.cpp | 2 +- src/session_logind.cpp | 2 +- src/tabbox/tabbox.h | 2 +- src/toplevel.h | 2 +- src/udev.cpp | 2 +- src/unmanaged.cpp | 2 +- src/utils/CMakeLists.txt | 1 + src/{utils.cpp => utils/common.cpp} | 2 +- src/{utils.h => utils/common.h} | 5 +---- src/utils/xcbutils.cpp | 2 +- src/workspace.h | 2 +- src/x11syncmanager.cpp | 2 +- src/xdgactivationv1.cpp | 2 +- src/xkb.cpp | 2 +- src/xwl/xwayland.cpp | 2 +- 58 files changed, 57 insertions(+), 60 deletions(-) rename src/{utils.cpp => utils/common.cpp} (99%) rename src/{utils.h => utils/common.h} (99%) diff --git a/autotests/test_x11_timestamp_update.cpp b/autotests/test_x11_timestamp_update.cpp index 41830b172c..624f6da8d3 100644 --- a/autotests/test_x11_timestamp_update.cpp +++ b/autotests/test_x11_timestamp_update.cpp @@ -13,7 +13,7 @@ #include #include "main.h" -#include "utils.h" +#include "utils/common.h" namespace KWin { diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 483c583886..79e88d8dd4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -131,7 +131,6 @@ target_sources(kwin PRIVATE udev.cpp unmanaged.cpp useractions.cpp - utils.cpp virtualdesktops.cpp virtualdesktopsdbustypes.cpp virtualkeyboard_dbus.cpp diff --git a/src/abstract_wayland_output.h b/src/abstract_wayland_output.h index 72d9f2912d..bbc2311946 100644 --- a/src/abstract_wayland_output.h +++ b/src/abstract_wayland_output.h @@ -10,7 +10,7 @@ #define KWIN_ABSTRACT_WAYLAND_OUTPUT_H #include "abstract_output.h" -#include "utils.h" +#include "utils/common.h" #include "renderloop.h" #include diff --git a/src/backends/drm/egl_gbm_backend.h b/src/backends/drm/egl_gbm_backend.h index 5b4773e861..b7633fe70b 100644 --- a/src/backends/drm/egl_gbm_backend.h +++ b/src/backends/drm/egl_gbm_backend.h @@ -9,7 +9,7 @@ #ifndef KWIN_EGL_GBM_BACKEND_H #define KWIN_EGL_GBM_BACKEND_H #include "abstract_egl_backend.h" -#include "utils.h" +#include "utils/common.h" #include diff --git a/src/backends/drm/scene_qpainter_drm_backend.h b/src/backends/drm/scene_qpainter_drm_backend.h index 9168b56732..88a6e9b259 100644 --- a/src/backends/drm/scene_qpainter_drm_backend.h +++ b/src/backends/drm/scene_qpainter_drm_backend.h @@ -9,7 +9,7 @@ #ifndef KWIN_SCENE_QPAINTER_DRM_BACKEND_H #define KWIN_SCENE_QPAINTER_DRM_BACKEND_H #include "qpainterbackend.h" -#include "utils.h" +#include "utils/common.h" #include #include diff --git a/src/backends/wayland/egl_wayland_backend.h b/src/backends/wayland/egl_wayland_backend.h index 661b6ad1a3..cbc9bb5c03 100644 --- a/src/backends/wayland/egl_wayland_backend.h +++ b/src/backends/wayland/egl_wayland_backend.h @@ -10,7 +10,7 @@ #ifndef KWIN_EGL_WAYLAND_BACKEND_H #define KWIN_EGL_WAYLAND_BACKEND_H #include "abstract_egl_backend.h" -#include "utils.h" +#include "utils/common.h" // wayland #include diff --git a/src/backends/wayland/scene_qpainter_wayland_backend.h b/src/backends/wayland/scene_qpainter_wayland_backend.h index c749d2f7c9..a46b3a253c 100644 --- a/src/backends/wayland/scene_qpainter_wayland_backend.h +++ b/src/backends/wayland/scene_qpainter_wayland_backend.h @@ -11,7 +11,7 @@ #define KWIN_SCENE_QPAINTER_WAYLAND_BACKEND_H #include "qpainterbackend.h" -#include "utils.h" +#include "utils/common.h" #include #include diff --git a/src/backends/x11/standalone/effects_mouse_interception_x11_filter.cpp b/src/backends/x11/standalone/effects_mouse_interception_x11_filter.cpp index 0f4b5119b9..e9699517a3 100644 --- a/src/backends/x11/standalone/effects_mouse_interception_x11_filter.cpp +++ b/src/backends/x11/standalone/effects_mouse_interception_x11_filter.cpp @@ -8,7 +8,7 @@ */ #include "effects_mouse_interception_x11_filter.h" #include "effects.h" -#include "utils.h" +#include "utils/common.h" #include diff --git a/src/backends/x11/standalone/effects_x11.cpp b/src/backends/x11/standalone/effects_x11.cpp index 7faf5e9dfa..36e9d02d0a 100644 --- a/src/backends/x11/standalone/effects_x11.cpp +++ b/src/backends/x11/standalone/effects_x11.cpp @@ -12,7 +12,7 @@ #include "cursor.h" #include "screenedge.h" #include "screens.h" -#include "utils.h" +#include "utils/common.h" #include "workspace.h" #include diff --git a/src/backends/x11/standalone/eglbackend.h b/src/backends/x11/standalone/eglbackend.h index d802540dba..9bb0c1261c 100644 --- a/src/backends/x11/standalone/eglbackend.h +++ b/src/backends/x11/standalone/eglbackend.h @@ -8,7 +8,7 @@ #include "eglonxbackend.h" #include "openglsurfacetexture_x11.h" -#include "utils.h" +#include "utils/common.h" #include #include diff --git a/src/backends/x11/standalone/glxbackend.h b/src/backends/x11/standalone/glxbackend.h index c608c95398..28c236c717 100644 --- a/src/backends/x11/standalone/glxbackend.h +++ b/src/backends/x11/standalone/glxbackend.h @@ -11,7 +11,7 @@ #include "openglbackend.h" #include "openglsurfacetexture_x11.h" #include "x11eventfilter.h" -#include "utils.h" +#include "utils/common.h" #include #include diff --git a/src/backends/x11/standalone/overlaywindow_x11.cpp b/src/backends/x11/standalone/overlaywindow_x11.cpp index 60f4630dc6..c257353273 100644 --- a/src/backends/x11/standalone/overlaywindow_x11.cpp +++ b/src/backends/x11/standalone/overlaywindow_x11.cpp @@ -13,7 +13,7 @@ #include "composite.h" #include "scene.h" #include "screens.h" -#include "utils.h" +#include "utils/common.h" #include "utils/xcbutils.h" #include diff --git a/src/backends/x11/standalone/x11cursor.cpp b/src/backends/x11/standalone/x11cursor.cpp index 3675fb1d08..d75b3faa0a 100644 --- a/src/backends/x11/standalone/x11cursor.cpp +++ b/src/backends/x11/standalone/x11cursor.cpp @@ -9,7 +9,7 @@ #include "x11cursor.h" #include "input.h" #include "keyboard_input.h" -#include "utils.h" +#include "utils/common.h" #include "utils/xcbutils.h" #include "xfixes_cursor_event_filter.h" diff --git a/src/client_machine.cpp b/src/client_machine.cpp index 3eba92c72c..01d9432062 100644 --- a/src/client_machine.cpp +++ b/src/client_machine.cpp @@ -8,7 +8,7 @@ */ // own #include "client_machine.h" -#include "utils.h" +#include "utils/common.h" // KF5 #include // Qt diff --git a/src/colordevice.cpp b/src/colordevice.cpp index 585b867dec..cd3460e506 100644 --- a/src/colordevice.cpp +++ b/src/colordevice.cpp @@ -6,7 +6,7 @@ #include "colordevice.h" #include "abstract_output.h" -#include "utils.h" +#include "utils/common.h" #include "3rdparty/colortemperature.h" diff --git a/src/colormanager.cpp b/src/colormanager.cpp index e618925b33..893f561797 100644 --- a/src/colormanager.cpp +++ b/src/colormanager.cpp @@ -10,7 +10,7 @@ #include "main.h" #include "platform.h" #include "session.h" -#include "utils.h" +#include "utils/common.h" namespace KWin { diff --git a/src/composite.cpp b/src/composite.cpp index 43859cf22c..048f6ecebe 100644 --- a/src/composite.cpp +++ b/src/composite.cpp @@ -28,7 +28,7 @@ #include "surfaceitem_x11.h" #include "unmanaged.h" #include "useractions.h" -#include "utils.h" +#include "utils/common.h" #include "wayland_server.h" #include "workspace.h" #include "x11syncmanager.h" diff --git a/src/cursor.cpp b/src/cursor.cpp index 8634a76579..625e570786 100644 --- a/src/cursor.cpp +++ b/src/cursor.cpp @@ -13,7 +13,7 @@ #include "keyboard_input.h" #include "main.h" #include "platform.h" -#include "utils.h" +#include "utils/common.h" #include "utils/xcbutils.h" #include "abstract_output.h" #include "composite.h" diff --git a/src/decorationitem.cpp b/src/decorationitem.cpp index ec1fb00ffc..55a99bdbea 100644 --- a/src/decorationitem.cpp +++ b/src/decorationitem.cpp @@ -12,7 +12,7 @@ #include "decorations/decoratedclient.h" #include "deleted.h" #include "scene.h" -#include "utils.h" +#include "utils/common.h" #include diff --git a/src/effectloader.cpp b/src/effectloader.cpp index 9549d12dba..af48885cfc 100644 --- a/src/effectloader.cpp +++ b/src/effectloader.cpp @@ -13,7 +13,7 @@ #include #include "plugin.h" #include "scripting/scriptedeffect.h" -#include "utils.h" +#include "utils/common.h" // KDE #include #include diff --git a/src/globalshortcuts.cpp b/src/globalshortcuts.cpp index 773f93c15b..01c546909d 100644 --- a/src/globalshortcuts.cpp +++ b/src/globalshortcuts.cpp @@ -12,7 +12,7 @@ #include "gestures.h" #include "kwinglobals.h" #include "main.h" -#include "utils.h" +#include "utils/common.h" #include // KDE #include diff --git a/src/group.h b/src/group.h index f850527674..5d514173bd 100644 --- a/src/group.h +++ b/src/group.h @@ -11,7 +11,7 @@ #ifndef KWIN_GROUP_H #define KWIN_GROUP_H -#include "utils.h" +#include "utils/common.h" #include namespace KWin diff --git a/src/inputmethod.cpp b/src/inputmethod.cpp index fa166e7752..a8bcda3e1b 100644 --- a/src/inputmethod.cpp +++ b/src/inputmethod.cpp @@ -12,7 +12,7 @@ #include "input.h" #include "inputpanelv1client.h" #include "keyboard_input.h" -#include "utils.h" +#include "utils/common.h" #include "screens.h" #include "wayland_server.h" #include "workspace.h" diff --git a/src/item.cpp b/src/item.cpp index 627d8e4cb5..7e6771f02e 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -12,7 +12,7 @@ #include "renderloop.h" #include "scene.h" #include "screens.h" -#include "utils.h" +#include "utils/common.h" namespace KWin { diff --git a/src/kcmkwin/kwinrules/CMakeLists.txt b/src/kcmkwin/kwinrules/CMakeLists.txt index 2b13ed21bb..7379bb41d1 100644 --- a/src/kcmkwin/kwinrules/CMakeLists.txt +++ b/src/kcmkwin/kwinrules/CMakeLists.txt @@ -10,7 +10,7 @@ set(kwinrules_SRCS ../../backends/x11/standalone/x11cursor.cpp ../../rules.cpp ../../placement.cpp - ../../utils.cpp + ../../utils/common.cpp ../../virtualdesktopsdbustypes.cpp kwinsrc.cpp optionsmodel.cpp diff --git a/src/keyboard_input.cpp b/src/keyboard_input.cpp index f342c23797..2e0c4aee9a 100644 --- a/src/keyboard_input.cpp +++ b/src/keyboard_input.cpp @@ -16,7 +16,7 @@ #include "modifier_only_shortcuts.h" #include "screenlockerwatcher.h" #include "toplevel.h" -#include "utils.h" +#include "utils/common.h" #include "wayland_server.h" #include "workspace.h" // KWayland diff --git a/src/layers.cpp b/src/layers.cpp index e94493be8d..9824656874 100644 --- a/src/layers.cpp +++ b/src/layers.cpp @@ -64,7 +64,7 @@ */ -#include "utils.h" +#include "utils/common.h" #include "x11client.h" #include "focuschain.h" #include "netinfo.h" diff --git a/src/options.cpp b/src/options.cpp index 22ee6e895c..52769c2256 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -11,7 +11,7 @@ #include "options.h" #include "config-kwin.h" -#include "utils.h" +#include "utils/common.h" #include "platform.h" #ifndef KCMRULES diff --git a/src/outline.cpp b/src/outline.cpp index f9ae2ac960..f9ce0bacfa 100644 --- a/src/outline.cpp +++ b/src/outline.cpp @@ -14,7 +14,7 @@ #include "main.h" #include "platform.h" #include "scripting/scripting.h" -#include "utils.h" +#include "utils/common.h" // Frameworks #include // Qt diff --git a/src/platformsupport/scenes/opengl/basiceglsurfacetexture_internal.cpp b/src/platformsupport/scenes/opengl/basiceglsurfacetexture_internal.cpp index 704ddb3c7b..521224dc4d 100644 --- a/src/platformsupport/scenes/opengl/basiceglsurfacetexture_internal.cpp +++ b/src/platformsupport/scenes/opengl/basiceglsurfacetexture_internal.cpp @@ -7,7 +7,7 @@ #include "basiceglsurfacetexture_internal.h" #include "kwingltexture.h" #include "surfaceitem_internal.h" -#include "utils.h" +#include "utils/common.h" #include diff --git a/src/platformsupport/scenes/opengl/basiceglsurfacetexture_wayland.cpp b/src/platformsupport/scenes/opengl/basiceglsurfacetexture_wayland.cpp index f399f6e3c3..380b38475f 100644 --- a/src/platformsupport/scenes/opengl/basiceglsurfacetexture_wayland.cpp +++ b/src/platformsupport/scenes/opengl/basiceglsurfacetexture_wayland.cpp @@ -9,7 +9,7 @@ #include "kwineglext.h" #include "kwingltexture.h" #include "surfaceitem_wayland.h" -#include "utils.h" +#include "utils/common.h" #include #include diff --git a/src/platformsupport/scenes/opengl/egl_dmabuf.cpp b/src/platformsupport/scenes/opengl/egl_dmabuf.cpp index 9187985075..1ae2b04dd3 100644 --- a/src/platformsupport/scenes/opengl/egl_dmabuf.cpp +++ b/src/platformsupport/scenes/opengl/egl_dmabuf.cpp @@ -12,7 +12,7 @@ #include "kwineglext.h" #include "kwineglutils_p.h" -#include "utils.h" +#include "utils/common.h" #include "wayland_server.h" #include diff --git a/src/platformsupport/scenes/opengl/openglbackend.cpp b/src/platformsupport/scenes/opengl/openglbackend.cpp index e9195d62d5..c801ce663a 100644 --- a/src/platformsupport/scenes/opengl/openglbackend.cpp +++ b/src/platformsupport/scenes/opengl/openglbackend.cpp @@ -12,7 +12,7 @@ #include #include "screens.h" -#include "utils.h" +#include "utils/common.h" #include diff --git a/src/platformsupport/scenes/qpainter/qpainterbackend.cpp b/src/platformsupport/scenes/qpainter/qpainterbackend.cpp index 1a3106445f..f4e556fd65 100644 --- a/src/platformsupport/scenes/qpainter/qpainterbackend.cpp +++ b/src/platformsupport/scenes/qpainter/qpainterbackend.cpp @@ -9,7 +9,7 @@ #include "qpainterbackend.h" #include "qpaintersurfacetexture_internal.h" #include "qpaintersurfacetexture_wayland.h" -#include "utils.h" +#include "utils/common.h" #include diff --git a/src/platformsupport/scenes/qpainter/qpaintersurfacetexture_wayland.cpp b/src/platformsupport/scenes/qpainter/qpaintersurfacetexture_wayland.cpp index 8f16e3259a..d1b22e39f2 100644 --- a/src/platformsupport/scenes/qpainter/qpaintersurfacetexture_wayland.cpp +++ b/src/platformsupport/scenes/qpainter/qpaintersurfacetexture_wayland.cpp @@ -6,7 +6,7 @@ #include "qpaintersurfacetexture_wayland.h" #include "surfaceitem_wayland.h" -#include "utils.h" +#include "utils/common.h" #include #include diff --git a/src/pluginmanager.cpp b/src/pluginmanager.cpp index d5ad2bc413..ed13a6be2a 100644 --- a/src/pluginmanager.cpp +++ b/src/pluginmanager.cpp @@ -8,7 +8,7 @@ #include "dbusinterface.h" #include "main.h" #include "plugin.h" -#include "utils.h" +#include "utils/common.h" #include #include diff --git a/src/plugins/screencast/screencaststream.cpp b/src/plugins/screencast/screencaststream.cpp index bb551817aa..cb3531f0dc 100644 --- a/src/plugins/screencast/screencaststream.cpp +++ b/src/plugins/screencast/screencaststream.cpp @@ -18,7 +18,7 @@ #include "pipewirecore.h" #include "platform.h" #include "screencastsource.h" -#include "utils.h" +#include "utils/common.h" #include diff --git a/src/renderloop.cpp b/src/renderloop.cpp index 310392c858..90cbbf1057 100644 --- a/src/renderloop.cpp +++ b/src/renderloop.cpp @@ -7,8 +7,8 @@ #include "renderloop.h" #include "options.h" #include "renderloop_p.h" -#include "utils.h" #include "surfaceitem.h" +#include "utils/common.h" namespace KWin { diff --git a/src/rules.h b/src/rules.h index 22bbb5bc73..6bb71b08d3 100644 --- a/src/rules.h +++ b/src/rules.h @@ -17,7 +17,7 @@ #include "placement.h" #include "options.h" -#include "utils.h" +#include "utils/common.h" class QDebug; class KConfig; diff --git a/src/scene.h b/src/scene.h index 8306f51b78..14411fdca3 100644 --- a/src/scene.h +++ b/src/scene.h @@ -11,7 +11,7 @@ #define KWIN_SCENE_H #include "toplevel.h" -#include "utils.h" +#include "utils/common.h" #include "kwineffects.h" #include diff --git a/src/scenes/opengl/scene_opengl.cpp b/src/scenes/opengl/scene_opengl.cpp index 0dd766cac2..b1cff70263 100644 --- a/src/scenes/opengl/scene_opengl.cpp +++ b/src/scenes/opengl/scene_opengl.cpp @@ -20,7 +20,7 @@ #include #include -#include "utils.h" +#include "utils/common.h" #include "abstract_client.h" #include "composite.h" #include "effects.h" diff --git a/src/screenedge.cpp b/src/screenedge.cpp index da91bf441a..569415ed17 100644 --- a/src/screenedge.cpp +++ b/src/screenedge.cpp @@ -25,7 +25,7 @@ #include "cursor.h" #include "main.h" #include "platform.h" -#include "utils.h" +#include "utils/common.h" #include #include "virtualdesktops.h" // DBus generated diff --git a/src/screens.cpp b/src/screens.cpp index 666acfeebd..6b3428e3db 100644 --- a/src/screens.cpp +++ b/src/screens.cpp @@ -10,7 +10,7 @@ #include #include "abstract_output.h" #include "cursor.h" -#include "utils.h" +#include "utils/common.h" #include "settings.h" #include #include diff --git a/src/session_consolekit.cpp b/src/session_consolekit.cpp index 979d19a369..e642327a5e 100644 --- a/src/session_consolekit.cpp +++ b/src/session_consolekit.cpp @@ -5,7 +5,7 @@ */ #include "session_consolekit.h" -#include "utils.h" +#include "utils/common.h" #include #include diff --git a/src/session_logind.cpp b/src/session_logind.cpp index 714ff812ed..818a96620b 100644 --- a/src/session_logind.cpp +++ b/src/session_logind.cpp @@ -5,7 +5,7 @@ */ #include "session_logind.h" -#include "utils.h" +#include "utils/common.h" #include #include diff --git a/src/tabbox/tabbox.h b/src/tabbox/tabbox.h index 313a24c7a2..ca497fb200 100644 --- a/src/tabbox/tabbox.h +++ b/src/tabbox/tabbox.h @@ -15,7 +15,7 @@ #include #include #include -#include "utils.h" +#include "utils/common.h" #include "tabbox/tabboxhandler.h" class KConfigGroup; diff --git a/src/toplevel.h b/src/toplevel.h index 256fdb4253..f6b5dd4e61 100644 --- a/src/toplevel.h +++ b/src/toplevel.h @@ -11,7 +11,7 @@ #define KWIN_TOPLEVEL_H // kwin -#include "utils.h" +#include "utils/common.h" #include "utils/xcbutils.h" // KDE #include diff --git a/src/udev.cpp b/src/udev.cpp index 94a35a1479..05f8004e3c 100644 --- a/src/udev.cpp +++ b/src/udev.cpp @@ -10,7 +10,7 @@ #include "main.h" #include "platform.h" #include "session.h" -#include "utils.h" +#include "utils/common.h" // Qt #include #include diff --git a/src/unmanaged.cpp b/src/unmanaged.cpp index 5cad066a72..de3caa303d 100644 --- a/src/unmanaged.cpp +++ b/src/unmanaged.cpp @@ -13,7 +13,7 @@ #include "effects.h" #include "deleted.h" #include "surfaceitem_x11.h" -#include "utils.h" +#include "utils/common.h" #include #include diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt index 72cd8fdb36..e4da9f6990 100644 --- a/src/utils/CMakeLists.txt +++ b/src/utils/CMakeLists.txt @@ -1,5 +1,6 @@ target_sources(kwin PRIVATE abstract_opengl_context_attribute_builder.cpp + common.cpp egl_context_attribute_builder.cpp subsurfacemonitor.cpp xcbutils.cpp diff --git a/src/utils.cpp b/src/utils/common.cpp similarity index 99% rename from src/utils.cpp rename to src/utils/common.cpp index d8d71f2b63..62be29a3ee 100644 --- a/src/utils.cpp +++ b/src/utils/common.cpp @@ -14,7 +14,7 @@ */ -#include "utils.h" +#include "utils/common.h" #include #include diff --git a/src/utils.h b/src/utils/common.h similarity index 99% rename from src/utils.h rename to src/utils/common.h index 0a90931b1c..196777f512 100644 --- a/src/utils.h +++ b/src/utils/common.h @@ -8,8 +8,7 @@ SPDX-License-Identifier: GPL-2.0-or-later */ -#ifndef KWIN_UTILS_H -#define KWIN_UTILS_H +#pragma once // cmake stuff #include @@ -238,5 +237,3 @@ KWIN_EXPORT QPoint popupOffset(const QRect &anchorRect, const Qt::Edges anchorEd // Must be outside namespace Q_DECLARE_OPERATORS_FOR_FLAGS(KWin::StrutAreas) Q_DECLARE_OPERATORS_FOR_FLAGS(KWin::QuickTileMode) - -#endif diff --git a/src/utils/xcbutils.cpp b/src/utils/xcbutils.cpp index 7563281a3b..337a9a07c2 100644 --- a/src/utils/xcbutils.cpp +++ b/src/utils/xcbutils.cpp @@ -8,7 +8,7 @@ SPDX-License-Identifier: GPL-2.0-or-later */ #include "utils/xcbutils.h" -#include "utils.h" +#include "utils/common.h" // Qt #include // xcb diff --git a/src/workspace.h b/src/workspace.h index 559f442f63..63a240d924 100644 --- a/src/workspace.h +++ b/src/workspace.h @@ -16,7 +16,7 @@ // kwin #include "options.h" #include "sm.h" -#include "utils.h" +#include "utils/common.h" // Qt #include #include diff --git a/src/x11syncmanager.cpp b/src/x11syncmanager.cpp index a2fb42ed10..99168ff09d 100644 --- a/src/x11syncmanager.cpp +++ b/src/x11syncmanager.cpp @@ -12,7 +12,7 @@ #include "platform.h" #include "renderbackend.h" #include "scene.h" -#include "utils.h" +#include "utils/common.h" #include "kwinglplatform.h" diff --git a/src/xdgactivationv1.cpp b/src/xdgactivationv1.cpp index fe98aeaf12..e2270a3393 100644 --- a/src/xdgactivationv1.cpp +++ b/src/xdgactivationv1.cpp @@ -10,7 +10,7 @@ #include "xdgactivationv1.h" #include "abstract_client.h" #include "effects.h" -#include "utils.h" +#include "utils/common.h" #include "wayland_server.h" #include "workspace.h" #include diff --git a/src/xkb.cpp b/src/xkb.cpp index 079ce0c815..038943abf7 100644 --- a/src/xkb.cpp +++ b/src/xkb.cpp @@ -7,7 +7,7 @@ SPDX-License-Identifier: GPL-2.0-or-later */ #include "xkb.h" -#include "utils.h" +#include "utils/common.h" // frameworks #include // KWayland diff --git a/src/xwl/xwayland.cpp b/src/xwl/xwayland.cpp index ed41a4e6f7..6887beaea1 100644 --- a/src/xwl/xwayland.cpp +++ b/src/xwl/xwayland.cpp @@ -17,7 +17,7 @@ #include "abstract_output.h" #include "main_wayland.h" #include "options.h" -#include "utils.h" +#include "utils/common.h" #include "platform.h" #include "utils/xcbutils.h" #include "wayland_server.h" -- GitLab