From 2bad73354a5dbb9be8ba9a39b6238017a216a25b Mon Sep 17 00:00:00 2001 From: user111111111111111111111111111111111 <192911676+user111111111111111111111111111111111@users.noreply.github.com> Date: Fri, 17 Jan 2025 15:21:35 +0000 Subject: [PATCH] core: cleanup header includes (#9088) Cleanup some unneeded includes to speed up compilation --- src/Compositor.cpp | 19 +++++++++++++++++++ src/Compositor.hpp | 18 ------------------ src/SharedDefs.hpp | 1 + src/config/ConfigManager.cpp | 13 ++++++++++++- src/config/ConfigManager.hpp | 13 +++++++------ src/config/ConfigValue.hpp | 3 +-- src/debug/CrashReporter.cpp | 1 + src/debug/HyprCtl.cpp | 10 ++++++++++ src/debug/HyprCtl.hpp | 2 +- src/debug/HyprDebugOverlay.cpp | 1 + src/debug/HyprDebugOverlay.hpp | 3 +-- src/debug/HyprNotificationOverlay.cpp | 4 ++++ src/debug/HyprNotificationOverlay.hpp | 1 - src/debug/Log.cpp | 1 - src/debug/Log.hpp | 2 -- src/defines.hpp | 2 ++ src/desktop/DesktopTypes.hpp | 2 +- src/desktop/LayerSurface.cpp | 6 ++++++ src/desktop/LayerSurface.hpp | 1 - src/desktop/Popup.cpp | 4 ++++ src/desktop/Subsurface.cpp | 2 ++ src/desktop/WLSurface.cpp | 4 +++- src/desktop/Window.cpp | 7 +++++++ src/desktop/Window.hpp | 2 +- src/desktop/Workspace.cpp | 2 ++ src/devices/Keyboard.cpp | 1 - src/events/Windows.cpp | 5 +++++ src/helpers/Color.hpp | 1 - src/helpers/MiscFunctions.cpp | 2 ++ src/helpers/MiscFunctions.hpp | 2 -- src/helpers/Monitor.cpp | 6 ++++++ src/helpers/Monitor.hpp | 1 + src/helpers/WLClasses.hpp | 6 +++--- src/hyprerror/HyprError.cpp | 2 ++ src/layout/DwindleLayout.cpp | 4 ++++ src/layout/IHyprLayout.cpp | 5 +++++ src/layout/MasterLayout.cpp | 4 ++++ src/layout/MasterLayout.hpp | 2 +- src/macros.hpp | 1 + src/managers/AnimationManager.cpp | 1 + src/managers/CursorManager.cpp | 1 + src/managers/HookSystemManager.hpp | 2 +- src/managers/KeybindManager.cpp | 6 ++++++ src/managers/PointerManager.cpp | 4 ++++ src/managers/ProtocolManager.hpp | 1 - src/managers/SeatManager.cpp | 3 +++ src/managers/SeatManager.hpp | 1 - src/managers/SessionLockManager.cpp | 4 +++- src/managers/input/InputManager.cpp | 5 +++++ src/managers/input/InputMethodPopup.cpp | 2 ++ src/managers/input/InputMethodRelay.cpp | 1 + src/managers/input/Swipe.cpp | 3 +++ src/managers/input/Tablets.cpp | 2 +- src/managers/input/TextInput.hpp | 2 +- src/managers/input/Touch.cpp | 2 ++ src/plugins/HookSystem.cpp | 4 ++-- src/plugins/PluginAPI.cpp | 5 +++++ src/plugins/PluginSystem.cpp | 4 +++- src/protocols/CTMControl.cpp | 1 + src/protocols/DRMLease.cpp | 1 + src/protocols/ForeignToplevel.cpp | 1 + src/protocols/ForeignToplevelWlr.cpp | 1 + src/protocols/GammaControl.cpp | 2 +- src/protocols/GlobalShortcuts.cpp | 1 - src/protocols/LayerShell.cpp | 2 ++ src/protocols/MesaDRM.cpp | 1 + src/protocols/OutputManagement.cpp | 3 +++ src/protocols/OutputPower.cpp | 2 +- src/protocols/PointerConstraints.cpp | 3 +++ src/protocols/PointerGestures.cpp | 1 - src/protocols/RelativePointer.cpp | 3 +-- src/protocols/Screencopy.cpp | 4 ++++ src/protocols/SessionLock.cpp | 3 ++- src/protocols/SinglePixel.cpp | 1 + src/protocols/Tablet.cpp | 1 + src/protocols/TearingControl.cpp | 1 + src/protocols/TextInputV1.cpp | 1 - src/protocols/ToplevelExport.cpp | 3 +++ src/protocols/XDGOutput.cpp | 4 ++-- src/protocols/XDGShell.cpp | 1 + src/protocols/core/DataDevice.cpp | 4 ++++ src/protocols/core/Shm.cpp | 2 +- src/protocols/types/DMABuffer.cpp | 1 + src/protocols/types/WLBuffer.cpp | 1 - src/render/OpenGL.cpp | 3 +++ src/render/OpenGL.hpp | 1 - src/render/Renderbuffer.cpp | 3 ++- src/render/Renderer.cpp | 7 +++++++ src/render/Renderer.hpp | 1 + .../decorations/CHyprBorderDecoration.cpp | 2 ++ .../decorations/CHyprDropShadowDecoration.cpp | 1 + .../decorations/CHyprGroupBarDecoration.cpp | 2 ++ .../decorations/DecorationPositioner.cpp | 4 +++- src/render/pass/Pass.cpp | 1 + src/render/pass/SurfacePassElement.cpp | 1 + src/xwayland/XSurface.cpp | 1 - src/xwayland/XWM.hpp | 1 - 97 files changed, 224 insertions(+), 72 deletions(-) diff --git a/src/Compositor.cpp b/src/Compositor.cpp index fcd15312..496ca4fe 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -42,6 +42,25 @@ #include "helpers/ByteOperations.hpp" #include "render/decorations/CHyprGroupBarDecoration.hpp" +#include "managers/KeybindManager.hpp" +#include "managers/SessionLockManager.hpp" +#include "managers/ThreadManager.hpp" +#include "managers/XWaylandManager.hpp" + +#include "config/ConfigManager.hpp" +#include "render/OpenGL.hpp" +#include "managers/input/InputManager.hpp" +#include "managers/AnimationManager.hpp" +#include "managers/EventManager.hpp" +#include "managers/HookSystemManager.hpp" +#include "managers/ProtocolManager.hpp" +#include "managers/LayoutManager.hpp" +#include "plugins/PluginSystem.hpp" +#include "helpers/Watchdog.hpp" +#include "hyprerror/HyprError.hpp" +#include "debug/HyprNotificationOverlay.hpp" +#include "debug/HyprDebugOverlay.hpp" + #include #include diff --git a/src/Compositor.hpp b/src/Compositor.hpp index 629b71bc..0a701a59 100644 --- a/src/Compositor.hpp +++ b/src/Compositor.hpp @@ -5,30 +5,12 @@ #include #include "defines.hpp" -#include "debug/Log.hpp" -#include "events/Events.hpp" -#include "config/ConfigManager.hpp" #include "managers/ThreadManager.hpp" #include "managers/XWaylandManager.hpp" -#include "managers/input/InputManager.hpp" -#include "managers/LayoutManager.hpp" #include "managers/KeybindManager.hpp" -#include "managers/AnimationManager.hpp" -#include "managers/EventManager.hpp" -#include "managers/ProtocolManager.hpp" #include "managers/SessionLockManager.hpp" -#include "managers/HookSystemManager.hpp" -#include "debug/HyprDebugOverlay.hpp" -#include "debug/HyprNotificationOverlay.hpp" -#include "helpers/Monitor.hpp" -#include "desktop/Workspace.hpp" #include "desktop/Window.hpp" #include "protocols/types/ColorManagement.hpp" -#include "render/Renderer.hpp" -#include "render/OpenGL.hpp" -#include "hyprerror/HyprError.hpp" -#include "plugins/PluginSystem.hpp" -#include "helpers/Watchdog.hpp" #include #include diff --git a/src/SharedDefs.hpp b/src/SharedDefs.hpp index a6271556..a46a2429 100644 --- a/src/SharedDefs.hpp +++ b/src/SharedDefs.hpp @@ -4,6 +4,7 @@ #include #include #include +#include #include enum eIcons : uint8_t { diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 17957899..52f2e316 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -11,8 +11,19 @@ #include "../protocols/LayerShell.hpp" #include "../xwayland/XWayland.hpp" #include "../protocols/OutputManagement.hpp" -#include "managers/AnimationManager.hpp" +#include "../managers/AnimationManager.hpp" +#include "../desktop/LayerSurface.hpp" +#include "defaultConfig.hpp" +#include "../render/Renderer.hpp" +#include "../hyprerror/HyprError.hpp" +#include "../managers/input/InputManager.hpp" +#include "../managers/LayoutManager.hpp" +#include "../managers/EventManager.hpp" +#include "../debug/HyprNotificationOverlay.hpp" +#include "../plugins/PluginSystem.hpp" + +#include "managers/HookSystemManager.hpp" #include #include #include diff --git a/src/config/ConfigManager.hpp b/src/config/ConfigManager.hpp index a27ee7ab..1ba1df62 100644 --- a/src/config/ConfigManager.hpp +++ b/src/config/ConfigManager.hpp @@ -4,23 +4,24 @@ #define CONFIG_MANAGER_H #include -#include "../debug/Log.hpp" #include #include "../defines.hpp" #include #include -#include #include #include #include -#include "../helpers/WLClasses.hpp" #include "../helpers/Monitor.hpp" -#include "../helpers/varlist/VarList.hpp" #include "../desktop/Window.hpp" -#include "../desktop/LayerSurface.hpp" +#include "../desktop/LayerRule.hpp" -#include "defaultConfig.hpp" #include "ConfigDataValues.hpp" +#include "SharedDefs.hpp" +#include "helpers/Color.hpp" +#include "desktop/DesktopTypes.hpp" +#include "helpers/memory/Memory.hpp" +#include "desktop/WindowRule.hpp" +#include "managers/XWaylandManager.hpp" #include diff --git a/src/config/ConfigValue.hpp b/src/config/ConfigValue.hpp index 181fdd0f..089ae8bf 100644 --- a/src/config/ConfigValue.hpp +++ b/src/config/ConfigValue.hpp @@ -3,7 +3,6 @@ #include #include #include -#include "../debug/Log.hpp" #include "../macros.hpp" #include "ConfigManager.hpp" @@ -71,4 +70,4 @@ template <> inline Hyprlang::CUSTOMTYPE CConfigValue::operator*() const { RASSERT(false, "Impossible to implement operator* of CConfigValue, use ptr()"); return *ptr(); -} \ No newline at end of file +} diff --git a/src/debug/CrashReporter.cpp b/src/debug/CrashReporter.cpp index 7bff7295..f6e0b55f 100644 --- a/src/debug/CrashReporter.cpp +++ b/src/debug/CrashReporter.cpp @@ -6,6 +6,7 @@ #include #include #include +#include "../helpers/MiscFunctions.hpp" #include "../plugins/PluginSystem.hpp" #include "../signal-safe.hpp" diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index 7edace21..41b0abe1 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -39,8 +39,18 @@ using namespace Hyprutils::String; #include "debug/RollingLogFollow.hpp" #include "config/ConfigManager.hpp" #include "helpers/MiscFunctions.hpp" +#include "../desktop/LayerSurface.hpp" #include "../version.h" +#include "../Compositor.hpp" +#include "../managers/input/InputManager.hpp" +#include "../managers/XWaylandManager.hpp" +#include "../managers/LayoutManager.hpp" +#include "../plugins/PluginSystem.hpp" +#include "../managers/AnimationManager.hpp" +#include "../debug/HyprNotificationOverlay.hpp" +#include "../render/Renderer.hpp" + static void trimTrailingComma(std::string& str) { if (!str.empty() && str.back() == ',') str.pop_back(); diff --git a/src/debug/HyprCtl.hpp b/src/debug/HyprCtl.hpp index c1bf51ca..2603612c 100644 --- a/src/debug/HyprCtl.hpp +++ b/src/debug/HyprCtl.hpp @@ -1,8 +1,8 @@ #pragma once -#include "../Compositor.hpp" #include #include "../helpers/MiscFunctions.hpp" +#include "../desktop/Window.hpp" #include // exposed for main.cpp diff --git a/src/debug/HyprDebugOverlay.cpp b/src/debug/HyprDebugOverlay.cpp index d72e2144..6e7a0407 100644 --- a/src/debug/HyprDebugOverlay.cpp +++ b/src/debug/HyprDebugOverlay.cpp @@ -4,6 +4,7 @@ #include "../Compositor.hpp" #include "../render/pass/TexPassElement.hpp" #include "../render/Renderer.hpp" +#include "../managers/AnimationManager.hpp" CHyprDebugOverlay::CHyprDebugOverlay() { m_pTexture = makeShared(); diff --git a/src/debug/HyprDebugOverlay.hpp b/src/debug/HyprDebugOverlay.hpp index 42cdac55..a58ecffc 100644 --- a/src/debug/HyprDebugOverlay.hpp +++ b/src/debug/HyprDebugOverlay.hpp @@ -1,7 +1,6 @@ #pragma once #include "../defines.hpp" -#include "../helpers/Monitor.hpp" #include "../render/Texture.hpp" #include #include @@ -49,4 +48,4 @@ class CHyprDebugOverlay { friend class CHyprRenderer; }; -inline std::unique_ptr g_pDebugOverlay; \ No newline at end of file +inline std::unique_ptr g_pDebugOverlay; diff --git a/src/debug/HyprNotificationOverlay.cpp b/src/debug/HyprNotificationOverlay.cpp index 504ad6c9..09125243 100644 --- a/src/debug/HyprNotificationOverlay.cpp +++ b/src/debug/HyprNotificationOverlay.cpp @@ -5,6 +5,10 @@ #include "../config/ConfigValue.hpp" #include "../render/pass/TexPassElement.hpp" +#include "../managers/AnimationManager.hpp" +#include "../managers/HookSystemManager.hpp" +#include "../render/Renderer.hpp" + static inline auto iconBackendFromLayout(PangoLayout* layout) { // preference: Nerd > FontAwesome > text auto eIconBackendChecks = std::array{ICONS_BACKEND_NF, ICONS_BACKEND_FA}; diff --git a/src/debug/HyprNotificationOverlay.hpp b/src/debug/HyprNotificationOverlay.hpp index 3ff0b35c..2546d04f 100644 --- a/src/debug/HyprNotificationOverlay.hpp +++ b/src/debug/HyprNotificationOverlay.hpp @@ -2,7 +2,6 @@ #include "../defines.hpp" #include "../helpers/Timer.hpp" -#include "../helpers/Monitor.hpp" #include "../render/Texture.hpp" #include "../SharedDefs.hpp" diff --git a/src/debug/Log.cpp b/src/debug/Log.cpp index 1563628c..9cf86345 100644 --- a/src/debug/Log.cpp +++ b/src/debug/Log.cpp @@ -1,6 +1,5 @@ #include "Log.hpp" #include "../defines.hpp" -#include "../Compositor.hpp" #include "RollingLogFollow.hpp" #include diff --git a/src/debug/Log.hpp b/src/debug/Log.hpp index 9696aa90..3791aeac 100644 --- a/src/debug/Log.hpp +++ b/src/debug/Log.hpp @@ -5,8 +5,6 @@ #include #include #include -#include "../includes.hpp" -#include "../helpers/MiscFunctions.hpp" #define LOGMESSAGESIZE 1024 #define ROLLING_LOG_SIZE 4096 diff --git a/src/defines.hpp b/src/defines.hpp index 41ee4502..5c70f21a 100644 --- a/src/defines.hpp +++ b/src/defines.hpp @@ -1,3 +1,5 @@ +#pragma once + #include "includes.hpp" #include "debug/Log.hpp" #include "helpers/Color.hpp" diff --git a/src/desktop/DesktopTypes.hpp b/src/desktop/DesktopTypes.hpp index 7f812cc1..ae2ac366 100644 --- a/src/desktop/DesktopTypes.hpp +++ b/src/desktop/DesktopTypes.hpp @@ -1,5 +1,5 @@ #pragma once -#include "../macros.hpp" +#include "helpers/memory/Memory.hpp" class CWorkspace; class CWindow; class CLayerSurface; diff --git a/src/desktop/LayerSurface.cpp b/src/desktop/LayerSurface.cpp index fe11f3f3..c572f6b2 100644 --- a/src/desktop/LayerSurface.cpp +++ b/src/desktop/LayerSurface.cpp @@ -5,6 +5,12 @@ #include "../protocols/core/Compositor.hpp" #include "../managers/SeatManager.hpp" #include "../managers/AnimationManager.hpp" +#include "../render/Renderer.hpp" +#include "../config/ConfigManager.hpp" +#include "../helpers/Monitor.hpp" +#include "../managers/input/InputManager.hpp" +#include "../managers/HookSystemManager.hpp" +#include "../managers/EventManager.hpp" PHLLS CLayerSurface::create(SP resource) { PHLLS pLS = SP(new CLayerSurface(resource)); diff --git a/src/desktop/LayerSurface.hpp b/src/desktop/LayerSurface.hpp index 3a03e57e..591dfd99 100644 --- a/src/desktop/LayerSurface.hpp +++ b/src/desktop/LayerSurface.hpp @@ -4,7 +4,6 @@ #include "../defines.hpp" #include "WLSurface.hpp" #include "../helpers/AnimatedVariable.hpp" -#include "LayerRule.hpp" class CLayerShellResource; diff --git a/src/desktop/Popup.cpp b/src/desktop/Popup.cpp index ce286b28..ce6ab9a0 100644 --- a/src/desktop/Popup.cpp +++ b/src/desktop/Popup.cpp @@ -6,6 +6,10 @@ #include "../protocols/core/Compositor.hpp" #include "../managers/SeatManager.hpp" #include "../managers/eventLoop/EventLoopManager.hpp" +#include "../desktop/LayerSurface.hpp" +#include "../managers/input/InputManager.hpp" +#include "../render/Renderer.hpp" +#include "../render/OpenGL.hpp" #include CPopup::CPopup(PHLWINDOW pOwner) : m_pWindowOwner(pOwner) { diff --git a/src/desktop/Subsurface.cpp b/src/desktop/Subsurface.cpp index 62854f80..26638f7a 100644 --- a/src/desktop/Subsurface.cpp +++ b/src/desktop/Subsurface.cpp @@ -4,6 +4,8 @@ #include "../config/ConfigValue.hpp" #include "../protocols/core/Compositor.hpp" #include "../protocols/core/Subcompositor.hpp" +#include "../render/Renderer.hpp" +#include "../managers/input/InputManager.hpp" CSubsurface::CSubsurface(PHLWINDOW pOwner) : m_pWindowParent(pOwner) { initSignals(); diff --git a/src/desktop/WLSurface.cpp b/src/desktop/WLSurface.cpp index 9ed8ec49..e86ac036 100644 --- a/src/desktop/WLSurface.cpp +++ b/src/desktop/WLSurface.cpp @@ -1,7 +1,9 @@ #include "WLSurface.hpp" -#include "../Compositor.hpp" +#include "LayerSurface.hpp" +#include "../desktop/Window.hpp" #include "../protocols/core/Compositor.hpp" #include "../protocols/LayerShell.hpp" +#include "../render/Renderer.hpp" void CWLSurface::assign(SP pSurface) { m_pResource = pSurface; diff --git a/src/desktop/Window.cpp b/src/desktop/Window.cpp index 5608daef..241a17d7 100644 --- a/src/desktop/Window.cpp +++ b/src/desktop/Window.cpp @@ -17,6 +17,13 @@ #include "../protocols/core/Compositor.hpp" #include "../xwayland/XWayland.hpp" #include "../helpers/Color.hpp" +#include "../events/Events.hpp" +#include "../managers/XWaylandManager.hpp" +#include "../render/Renderer.hpp" +#include "../managers/LayoutManager.hpp" +#include "../managers/HookSystemManager.hpp" +#include "../managers/EventManager.hpp" +#include "../managers/input/InputManager.hpp" #include diff --git a/src/desktop/Window.hpp b/src/desktop/Window.hpp index d503ac3b..ebda235c 100644 --- a/src/desktop/Window.hpp +++ b/src/desktop/Window.hpp @@ -4,7 +4,6 @@ #include #include "../config/ConfigDataValues.hpp" -#include "../defines.hpp" #include "../helpers/AnimatedVariable.hpp" #include "../helpers/math/Math.hpp" #include "../helpers/signal/Signal.hpp" @@ -12,6 +11,7 @@ #include "../macros.hpp" #include "../managers/XWaylandManager.hpp" #include "../render/decorations/IHyprWindowDecoration.hpp" +#include "../render/Transformer.hpp" #include "DesktopTypes.hpp" #include "Popup.hpp" #include "Subsurface.hpp" diff --git a/src/desktop/Workspace.cpp b/src/desktop/Workspace.cpp index 07c1a435..99ba441d 100644 --- a/src/desktop/Workspace.cpp +++ b/src/desktop/Workspace.cpp @@ -3,6 +3,8 @@ #include "../config/ConfigValue.hpp" #include "config/ConfigManager.hpp" #include "managers/AnimationManager.hpp" +#include "../managers/EventManager.hpp" +#include "../managers/HookSystemManager.hpp" #include #include diff --git a/src/devices/Keyboard.cpp b/src/devices/Keyboard.cpp index 0a8f6b57..191cc6b2 100644 --- a/src/devices/Keyboard.cpp +++ b/src/devices/Keyboard.cpp @@ -1,6 +1,5 @@ #include "Keyboard.hpp" #include "../defines.hpp" -#include "../Compositor.hpp" #include diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index 14e89b4b..cadd4cbc 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -14,6 +14,11 @@ #include "../xwayland/XSurface.hpp" #include "managers/AnimationManager.hpp" #include "managers/PointerManager.hpp" +#include "../desktop/LayerSurface.hpp" +#include "../managers/input/InputManager.hpp" +#include "../managers/LayoutManager.hpp" +#include "../managers/EventManager.hpp" +#include "../managers/AnimationManager.hpp" #include using namespace Hyprutils::String; diff --git a/src/helpers/Color.hpp b/src/helpers/Color.hpp index 0ea816f3..8050bebd 100644 --- a/src/helpers/Color.hpp +++ b/src/helpers/Color.hpp @@ -2,7 +2,6 @@ #include #include -#include "../debug/Log.hpp" #include "../macros.hpp" class CHyprColor { diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp index 0fa73e45..fafe1811 100644 --- a/src/helpers/MiscFunctions.cpp +++ b/src/helpers/MiscFunctions.cpp @@ -3,6 +3,8 @@ #include #include "../Compositor.hpp" #include "../managers/TokenManager.hpp" +#include "Monitor.hpp" +#include "../config/ConfigManager.hpp" #include #include #include diff --git a/src/helpers/MiscFunctions.hpp b/src/helpers/MiscFunctions.hpp index 64802279..d0824284 100644 --- a/src/helpers/MiscFunctions.hpp +++ b/src/helpers/MiscFunctions.hpp @@ -1,9 +1,7 @@ #pragma once #include -#include #include -#include "math/Math.hpp" #include #include #include diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index cf62bc54..718baf23 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -17,9 +17,15 @@ #include "../managers/PointerManager.hpp" #include "../managers/eventLoop/EventLoopManager.hpp" #include "../protocols/core/Compositor.hpp" +#include "../render/Renderer.hpp" +#include "../managers/EventManager.hpp" +#include "../managers/LayoutManager.hpp" +#include "../managers/input/InputManager.hpp" #include "sync/SyncTimeline.hpp" +#include "../desktop/LayerSurface.hpp" #include #include "debug/Log.hpp" +#include "debug/HyprNotificationOverlay.hpp" #include #include #include diff --git a/src/helpers/Monitor.hpp b/src/helpers/Monitor.hpp index 8c7566e2..3335a896 100644 --- a/src/helpers/Monitor.hpp +++ b/src/helpers/Monitor.hpp @@ -4,6 +4,7 @@ #include #include #include "../SharedDefs.hpp" +#include "MiscFunctions.hpp" #include "WLClasses.hpp" #include #include diff --git a/src/helpers/WLClasses.hpp b/src/helpers/WLClasses.hpp index b6e3ac12..c2e828e7 100644 --- a/src/helpers/WLClasses.hpp +++ b/src/helpers/WLClasses.hpp @@ -1,13 +1,13 @@ #pragma once -#include "../events/Events.hpp" #include "../defines.hpp" -#include "../desktop/Window.hpp" #include "../desktop/Subsurface.hpp" #include "../desktop/Popup.hpp" #include "../desktop/WLSurface.hpp" +#include "macros.hpp" +#include "desktop/DesktopTypes.hpp" +#include "helpers/memory/Memory.hpp" #include "signal/Signal.hpp" -#include "math/Math.hpp" class CMonitor; class IPointer; diff --git a/src/hyprerror/HyprError.cpp b/src/hyprerror/HyprError.cpp index 5e0dcf5e..d14173bf 100644 --- a/src/hyprerror/HyprError.cpp +++ b/src/hyprerror/HyprError.cpp @@ -4,6 +4,8 @@ #include "../config/ConfigValue.hpp" #include "../render/pass/TexPassElement.hpp" #include "../managers/AnimationManager.hpp" +#include "../render/Renderer.hpp" +#include "../managers/HookSystemManager.hpp" #include using namespace Hyprutils::Animation; diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index 2ee41eba..c6cf2b4c 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -2,6 +2,10 @@ #include "../Compositor.hpp" #include "../config/ConfigValue.hpp" #include "../render/decorations/CHyprGroupBarDecoration.hpp" +#include "../render/Renderer.hpp" +#include "../managers/input/InputManager.hpp" +#include "../managers/LayoutManager.hpp" +#include "../managers/EventManager.hpp" void SDwindleNodeData::recalcSizePosRecursive(bool force, bool horizontalOverride, bool verticalOverride) { if (children[0]) { diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp index eeebd815..156141f6 100644 --- a/src/layout/IHyprLayout.cpp +++ b/src/layout/IHyprLayout.cpp @@ -7,6 +7,11 @@ #include "../protocols/XDGShell.hpp" #include "../protocols/core/Compositor.hpp" #include "../xwayland/XSurface.hpp" +#include "../render/Renderer.hpp" +#include "../managers/input/InputManager.hpp" +#include "../managers/LayoutManager.hpp" +#include "../managers/EventManager.hpp" +#include "../managers/HookSystemManager.hpp" void IHyprLayout::onWindowCreated(PHLWINDOW pWindow, eDirection direction) { CBox desiredGeometry = {}; diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp index e6e22326..3b8ff734 100644 --- a/src/layout/MasterLayout.cpp +++ b/src/layout/MasterLayout.cpp @@ -4,6 +4,10 @@ #include "config/ConfigDataValues.hpp" #include #include "../config/ConfigValue.hpp" +#include "../render/Renderer.hpp" +#include "../managers/input/InputManager.hpp" +#include "../managers/LayoutManager.hpp" +#include "../managers/EventManager.hpp" SMasterNodeData* CHyprMasterLayout::getNodeFromWindow(PHLWINDOW pWindow) { for (auto& nd : m_lMasterNodesData) { diff --git a/src/layout/MasterLayout.hpp b/src/layout/MasterLayout.hpp index 03ca3c3b..381ccc9d 100644 --- a/src/layout/MasterLayout.hpp +++ b/src/layout/MasterLayout.hpp @@ -2,7 +2,7 @@ #include "IHyprLayout.hpp" #include "../desktop/DesktopTypes.hpp" -#include "../config/ConfigManager.hpp" +#include "../helpers/varlist/VarList.hpp" #include #include #include diff --git a/src/macros.hpp b/src/macros.hpp index de2fd009..08c17952 100644 --- a/src/macros.hpp +++ b/src/macros.hpp @@ -6,6 +6,7 @@ #include #include "helpers/memory/Memory.hpp" +#include "debug/Log.hpp" #ifndef NDEBUG #ifdef HYPRLAND_DEBUG diff --git a/src/managers/AnimationManager.cpp b/src/managers/AnimationManager.cpp index 28adc330..9cf35116 100644 --- a/src/managers/AnimationManager.cpp +++ b/src/managers/AnimationManager.cpp @@ -10,6 +10,7 @@ #include "../desktop/LayerSurface.hpp" #include "eventLoop/EventLoopManager.hpp" #include "../helpers/varlist/VarList.hpp" +#include "../render/Renderer.hpp" #include #include diff --git a/src/managers/CursorManager.cpp b/src/managers/CursorManager.cpp index 2dd97feb..d6584f35 100644 --- a/src/managers/CursorManager.cpp +++ b/src/managers/CursorManager.cpp @@ -3,6 +3,7 @@ #include "../config/ConfigValue.hpp" #include "PointerManager.hpp" #include "../xwayland/XWayland.hpp" +#include "../managers/HookSystemManager.hpp" static int cursorAnimTimer(SP self, void* data) { const auto cursorMgr = reinterpret_cast(data); diff --git a/src/managers/HookSystemManager.hpp b/src/managers/HookSystemManager.hpp index 75377aaa..5a9d0c00 100644 --- a/src/managers/HookSystemManager.hpp +++ b/src/managers/HookSystemManager.hpp @@ -57,4 +57,4 @@ class CHookSystemManager { std::unordered_map> m_mRegisteredHooks; }; -inline std::unique_ptr g_pHookSystem; \ No newline at end of file +inline std::unique_ptr g_pHookSystem; diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 9a719130..a1979206 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -13,6 +13,12 @@ #include "debug/Log.hpp" #include "helpers/varlist/VarList.hpp" #include "../helpers/signal/Signal.hpp" +#include "../managers/HookSystemManager.hpp" +#include "../managers/input/InputManager.hpp" +#include "../managers/LayoutManager.hpp" +#include "../managers/EventManager.hpp" +#include "../render/Renderer.hpp" +#include "../hyprerror/HyprError.hpp" #include #include diff --git a/src/managers/PointerManager.cpp b/src/managers/PointerManager.cpp index 522187b4..df145f6d 100644 --- a/src/managers/PointerManager.cpp +++ b/src/managers/PointerManager.cpp @@ -9,6 +9,10 @@ #include "../protocols/core/Seat.hpp" #include "eventLoop/EventLoopManager.hpp" #include "../render/pass/TexPassElement.hpp" +#include "../managers/input/InputManager.hpp" +#include "../managers/HookSystemManager.hpp" +#include "../render/Renderer.hpp" +#include "../render/OpenGL.hpp" #include "SeatManager.hpp" #include #include diff --git a/src/managers/ProtocolManager.hpp b/src/managers/ProtocolManager.hpp index 69dadd0f..6ceff9ad 100644 --- a/src/managers/ProtocolManager.hpp +++ b/src/managers/ProtocolManager.hpp @@ -1,7 +1,6 @@ #pragma once #include "../defines.hpp" -#include "../helpers/Monitor.hpp" #include "../helpers/memory/Memory.hpp" #include "../helpers/signal/Signal.hpp" #include diff --git a/src/managers/SeatManager.cpp b/src/managers/SeatManager.cpp index 3b9a4925..8fee6b16 100644 --- a/src/managers/SeatManager.cpp +++ b/src/managers/SeatManager.cpp @@ -6,6 +6,9 @@ #include "../protocols/core/Compositor.hpp" #include "../Compositor.hpp" #include "../devices/IKeyboard.hpp" +#include "../desktop/LayerSurface.hpp" +#include "../managers/input/InputManager.hpp" +#include "../managers/HookSystemManager.hpp" #include "wlr-layer-shell-unstable-v1.hpp" #include #include diff --git a/src/managers/SeatManager.hpp b/src/managers/SeatManager.hpp index ccfe5e76..32472aa3 100644 --- a/src/managers/SeatManager.hpp +++ b/src/managers/SeatManager.hpp @@ -2,7 +2,6 @@ #include #include -#include "../macros.hpp" #include "../helpers/signal/Signal.hpp" #include "../helpers/math/Math.hpp" #include "../protocols/types/DataDevice.hpp" diff --git a/src/managers/SessionLockManager.cpp b/src/managers/SessionLockManager.cpp index b7110990..3d77f05a 100644 --- a/src/managers/SessionLockManager.cpp +++ b/src/managers/SessionLockManager.cpp @@ -4,6 +4,8 @@ #include "../protocols/FractionalScale.hpp" #include "../protocols/SessionLock.hpp" #include "../managers/SeatManager.hpp" +#include "../render/Renderer.hpp" +#include "../managers/input/InputManager.hpp" #include #include @@ -185,4 +187,4 @@ bool CSessionLockManager::shallConsiderLockMissing() { static auto LOCKDEAD_SCREEN_DELAY = CConfigValue("misc:lockdead_screen_delay"); return m_pSessionLock->mLockTimer.getMillis() > *LOCKDEAD_SCREEN_DELAY; -} \ No newline at end of file +} diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 8a50a7bf..3d8c6de8 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -5,6 +5,7 @@ #include #include "../../config/ConfigValue.hpp" #include "../../desktop/Window.hpp" +#include "../../desktop/LayerSurface.hpp" #include "../../protocols/CursorShape.hpp" #include "../../protocols/IdleInhibit.hpp" #include "../../protocols/RelativePointer.hpp" @@ -29,6 +30,10 @@ #include "../../managers/PointerManager.hpp" #include "../../managers/SeatManager.hpp" #include "../../managers/KeybindManager.hpp" +#include "../../render/Renderer.hpp" +#include "../../managers/HookSystemManager.hpp" +#include "../../managers/EventManager.hpp" +#include "../../managers/LayoutManager.hpp" #include diff --git a/src/managers/input/InputMethodPopup.cpp b/src/managers/input/InputMethodPopup.cpp index ffb4edcc..8c55416b 100644 --- a/src/managers/input/InputMethodPopup.cpp +++ b/src/managers/input/InputMethodPopup.cpp @@ -4,6 +4,8 @@ #include "../../protocols/FractionalScale.hpp" #include "../../protocols/InputMethodV2.hpp" #include "../../protocols/core/Compositor.hpp" +#include "../../helpers/Monitor.hpp" +#include "../../render/Renderer.hpp" CInputPopup::CInputPopup(SP popup_) : popup(popup_) { listeners.commit = popup_->events.commit.registerListener([this](std::any d) { onCommit(); }); diff --git a/src/managers/input/InputMethodRelay.cpp b/src/managers/input/InputMethodRelay.cpp index 88439924..58cff043 100644 --- a/src/managers/input/InputMethodRelay.cpp +++ b/src/managers/input/InputMethodRelay.cpp @@ -5,6 +5,7 @@ #include "../../protocols/TextInputV1.hpp" #include "../../protocols/InputMethodV2.hpp" #include "../../protocols/core/Compositor.hpp" +#include "../../managers/HookSystemManager.hpp" CInputMethodRelay::CInputMethodRelay() { static auto P = diff --git a/src/managers/input/Swipe.cpp b/src/managers/input/Swipe.cpp index 3e03c4c7..b5282e3c 100644 --- a/src/managers/input/Swipe.cpp +++ b/src/managers/input/Swipe.cpp @@ -1,6 +1,9 @@ #include "InputManager.hpp" #include "../../Compositor.hpp" +#include "../../desktop/LayerSurface.hpp" #include "../../config/ConfigValue.hpp" +#include "../../managers/HookSystemManager.hpp" +#include "../../render/Renderer.hpp" void CInputManager::onSwipeBegin(IPointer::SSwipeBeginEvent e) { static auto PSWIPE = CConfigValue("gestures:workspace_swipe"); diff --git a/src/managers/input/Tablets.cpp b/src/managers/input/Tablets.cpp index d7ebfe87..f61d8184 100644 --- a/src/managers/input/Tablets.cpp +++ b/src/managers/input/Tablets.cpp @@ -1,5 +1,5 @@ #include "InputManager.hpp" -#include "../../Compositor.hpp" +#include "../../desktop/Window.hpp" #include "../../protocols/Tablet.hpp" #include "../../devices/Tablet.hpp" #include "../../managers/PointerManager.hpp" diff --git a/src/managers/input/TextInput.hpp b/src/managers/input/TextInput.hpp index 3cf07006..c0b590ac 100644 --- a/src/managers/input/TextInput.hpp +++ b/src/managers/input/TextInput.hpp @@ -1,8 +1,8 @@ #pragma once -#include "../../macros.hpp" #include "../../helpers/math/Math.hpp" #include "../../helpers/signal/Signal.hpp" +#include "../../helpers/memory/Memory.hpp" #include struct wl_client; diff --git a/src/managers/input/Touch.cpp b/src/managers/input/Touch.cpp index 7212ba61..990fbc41 100644 --- a/src/managers/input/Touch.cpp +++ b/src/managers/input/Touch.cpp @@ -1,9 +1,11 @@ #include "InputManager.hpp" #include "../../Compositor.hpp" +#include "../../desktop/LayerSurface.hpp" #include "../../config/ConfigValue.hpp" #include "../../devices/ITouch.hpp" #include "../SeatManager.hpp" #include "managers/AnimationManager.hpp" +#include "../HookSystemManager.hpp" void CInputManager::onTouchDown(ITouch::SDownEvent e) { m_bLastInputTouch = true; diff --git a/src/plugins/HookSystem.cpp b/src/plugins/HookSystem.cpp index 3baca5b1..c19f6f46 100644 --- a/src/plugins/HookSystem.cpp +++ b/src/plugins/HookSystem.cpp @@ -2,7 +2,7 @@ #include "../debug/Log.hpp" #include "../helpers/varlist/VarList.hpp" #include "../managers/TokenManager.hpp" -#include "../Compositor.hpp" +#include "../helpers/MiscFunctions.hpp" #define register #include @@ -383,4 +383,4 @@ uint64_t CHookSystem::getAddressForTrampo() { Debug::log(LOG, "getAddressForTrampo: Returning addr 0x{:x} for page at 0x{:x}", ADDRFORCONSUMER, page->addr); return ADDRFORCONSUMER; -} \ No newline at end of file +} diff --git a/src/plugins/PluginAPI.cpp b/src/plugins/PluginAPI.cpp index 5e1d9e58..b6bbc460 100644 --- a/src/plugins/PluginAPI.cpp +++ b/src/plugins/PluginAPI.cpp @@ -1,6 +1,11 @@ #include "PluginAPI.hpp" #include "../Compositor.hpp" #include "../debug/HyprCtl.hpp" +#include "../plugins/PluginSystem.hpp" +#include "../managers/HookSystemManager.hpp" +#include "../managers/LayoutManager.hpp" +#include "../config/ConfigManager.hpp" +#include "../debug/HyprNotificationOverlay.hpp" #include #include diff --git a/src/plugins/PluginSystem.cpp b/src/plugins/PluginSystem.cpp index 52a3bace..ce7dd7c7 100644 --- a/src/plugins/PluginSystem.cpp +++ b/src/plugins/PluginSystem.cpp @@ -2,7 +2,9 @@ #include #include -#include "../Compositor.hpp" +#include "../config/ConfigManager.hpp" +#include "../managers/LayoutManager.hpp" +#include "../managers/HookSystemManager.hpp" CPluginSystem::CPluginSystem() { g_pFunctionHookSystem = std::make_unique(); diff --git a/src/protocols/CTMControl.cpp b/src/protocols/CTMControl.cpp index fd7cdcd6..91e05ac4 100644 --- a/src/protocols/CTMControl.cpp +++ b/src/protocols/CTMControl.cpp @@ -4,6 +4,7 @@ #include "core/Output.hpp" #include "../config/ConfigValue.hpp" #include "managers/AnimationManager.hpp" +#include "../helpers/Monitor.hpp" CHyprlandCTMControlResource::CHyprlandCTMControlResource(SP resource_) : resource(resource_) { if (!good()) diff --git a/src/protocols/DRMLease.cpp b/src/protocols/DRMLease.cpp index be5a6985..4ab46a46 100644 --- a/src/protocols/DRMLease.cpp +++ b/src/protocols/DRMLease.cpp @@ -1,5 +1,6 @@ #include "DRMLease.hpp" #include "../Compositor.hpp" +#include "../helpers/Monitor.hpp" #include "managers/eventLoop/EventLoopManager.hpp" #include #include diff --git a/src/protocols/ForeignToplevel.cpp b/src/protocols/ForeignToplevel.cpp index 38bb5e69..f6513a1d 100644 --- a/src/protocols/ForeignToplevel.cpp +++ b/src/protocols/ForeignToplevel.cpp @@ -1,5 +1,6 @@ #include "ForeignToplevel.hpp" #include "../Compositor.hpp" +#include "../managers/HookSystemManager.hpp" CForeignToplevelHandle::CForeignToplevelHandle(SP resource_, PHLWINDOW pWindow_) : resource(resource_), pWindow(pWindow_) { if (!resource_->resource()) diff --git a/src/protocols/ForeignToplevelWlr.cpp b/src/protocols/ForeignToplevelWlr.cpp index 6bbd377c..45ef3f93 100644 --- a/src/protocols/ForeignToplevelWlr.cpp +++ b/src/protocols/ForeignToplevelWlr.cpp @@ -3,6 +3,7 @@ #include "../Compositor.hpp" #include "protocols/core/Output.hpp" #include "render/Renderer.hpp" +#include "../managers/HookSystemManager.hpp" CForeignToplevelHandleWlr::CForeignToplevelHandleWlr(SP resource_, PHLWINDOW pWindow_) : resource(resource_), pWindow(pWindow_) { if (!resource_->resource()) diff --git a/src/protocols/GammaControl.cpp b/src/protocols/GammaControl.cpp index 14c6596f..b0da29a2 100644 --- a/src/protocols/GammaControl.cpp +++ b/src/protocols/GammaControl.cpp @@ -2,8 +2,8 @@ #include #include #include "../helpers/Monitor.hpp" -#include "../Compositor.hpp" #include "../protocols/core/Output.hpp" +#include "../render/Renderer.hpp" CGammaControl::CGammaControl(SP resource_, wl_resource* output) : resource(resource_) { if (!resource_->resource()) diff --git a/src/protocols/GlobalShortcuts.cpp b/src/protocols/GlobalShortcuts.cpp index b02126ef..ca67f063 100644 --- a/src/protocols/GlobalShortcuts.cpp +++ b/src/protocols/GlobalShortcuts.cpp @@ -1,5 +1,4 @@ #include "GlobalShortcuts.hpp" -#include "../Compositor.hpp" CShortcutClient::CShortcutClient(SP resource_) : resource(resource_) { if (!good()) diff --git a/src/protocols/LayerShell.cpp b/src/protocols/LayerShell.cpp index 5ceae5f2..0777149f 100644 --- a/src/protocols/LayerShell.cpp +++ b/src/protocols/LayerShell.cpp @@ -1,8 +1,10 @@ #include "LayerShell.hpp" #include "../Compositor.hpp" +#include "../desktop/LayerSurface.hpp" #include "XDGShell.hpp" #include "core/Compositor.hpp" #include "core/Output.hpp" +#include "../helpers/Monitor.hpp" void CLayerShellResource::SState::reset() { anchor = 0; diff --git a/src/protocols/MesaDRM.cpp b/src/protocols/MesaDRM.cpp index b4efd2c8..41536988 100644 --- a/src/protocols/MesaDRM.cpp +++ b/src/protocols/MesaDRM.cpp @@ -3,6 +3,7 @@ #include #include "../Compositor.hpp" #include "types/WLBuffer.hpp" +#include "../render/OpenGL.hpp" CMesaDRMBufferResource::CMesaDRMBufferResource(uint32_t id, wl_client* client, Aquamarine::SDMABUFAttrs attrs_) { LOGM(LOG, "Creating a Mesa dmabuf, with id {}: size {}, fmt {}, planes {}", id, attrs_.size, attrs_.format, attrs_.planes); diff --git a/src/protocols/OutputManagement.cpp b/src/protocols/OutputManagement.cpp index 4f7d48c4..4a976021 100644 --- a/src/protocols/OutputManagement.cpp +++ b/src/protocols/OutputManagement.cpp @@ -1,6 +1,9 @@ #include "OutputManagement.hpp" #include #include "../Compositor.hpp" +#include "../managers/input/InputManager.hpp" +#include "../managers/HookSystemManager.hpp" +#include "../config/ConfigManager.hpp" using namespace Aquamarine; diff --git a/src/protocols/OutputPower.cpp b/src/protocols/OutputPower.cpp index 257155e4..dd3e8e1a 100644 --- a/src/protocols/OutputPower.cpp +++ b/src/protocols/OutputPower.cpp @@ -1,6 +1,6 @@ #include "OutputPower.hpp" -#include "../Compositor.hpp" #include "core/Output.hpp" +#include "../helpers/Monitor.hpp" COutputPower::COutputPower(SP resource_, PHLMONITOR pMonitor_) : resource(resource_), pMonitor(pMonitor_) { if (!resource->resource()) diff --git a/src/protocols/PointerConstraints.cpp b/src/protocols/PointerConstraints.cpp index 0a787414..e12fa75f 100644 --- a/src/protocols/PointerConstraints.cpp +++ b/src/protocols/PointerConstraints.cpp @@ -4,6 +4,9 @@ #include "../config/ConfigValue.hpp" #include "../managers/SeatManager.hpp" #include "core/Compositor.hpp" +#include "../managers/input/InputManager.hpp" +#include "../render/Renderer.hpp" +#include "../helpers/Monitor.hpp" CPointerConstraint::CPointerConstraint(SP resource_, SP surf, wl_resource* region_, zwpPointerConstraintsV1Lifetime lifetime_) : resourceL(resource_), locked(true), lifetime(lifetime_) { diff --git a/src/protocols/PointerGestures.cpp b/src/protocols/PointerGestures.cpp index 4eb74102..5dfb9d51 100644 --- a/src/protocols/PointerGestures.cpp +++ b/src/protocols/PointerGestures.cpp @@ -1,5 +1,4 @@ #include "PointerGestures.hpp" -#include "../Compositor.hpp" #include "../managers/SeatManager.hpp" #include "core/Seat.hpp" #include "core/Compositor.hpp" diff --git a/src/protocols/RelativePointer.cpp b/src/protocols/RelativePointer.cpp index 16248c02..b7cf75c6 100644 --- a/src/protocols/RelativePointer.cpp +++ b/src/protocols/RelativePointer.cpp @@ -1,5 +1,4 @@ #include "RelativePointer.hpp" -#include "../Compositor.hpp" #include "../managers/SeatManager.hpp" #include "core/Seat.hpp" #include @@ -71,4 +70,4 @@ void CRelativePointerProtocol::sendRelativeMotion(uint64_t time, const Vector2D& rp->sendRelativeMotion(time, delta, deltaUnaccel); } -} \ No newline at end of file +} diff --git a/src/protocols/Screencopy.cpp b/src/protocols/Screencopy.cpp index 898a1d6b..da0a9412 100644 --- a/src/protocols/Screencopy.cpp +++ b/src/protocols/Screencopy.cpp @@ -2,6 +2,10 @@ #include "../Compositor.hpp" #include "../managers/eventLoop/EventLoopManager.hpp" #include "../managers/PointerManager.hpp" +#include "../managers/EventManager.hpp" +#include "../render/Renderer.hpp" +#include "../render/OpenGL.hpp" +#include "../helpers/Monitor.hpp" #include "core/Output.hpp" #include "types/WLBuffer.hpp" #include "types/Buffer.hpp" diff --git a/src/protocols/SessionLock.cpp b/src/protocols/SessionLock.cpp index 642a5b89..c3f19e53 100644 --- a/src/protocols/SessionLock.cpp +++ b/src/protocols/SessionLock.cpp @@ -4,6 +4,7 @@ #include "FractionalScale.hpp" #include "core/Compositor.hpp" #include "core/Output.hpp" +#include "../helpers/Monitor.hpp" CSessionLockSurface::CSessionLockSurface(SP resource_, SP surface_, PHLMONITOR pMonitor_, WP owner_) : resource(resource_), sessionLock(owner_), pSurface(surface_), pMonitor(pMonitor_) { @@ -208,4 +209,4 @@ void CSessionLockProtocol::onGetLockSurface(CExtSessionLockV1* lock, uint32_t id bool CSessionLockProtocol::isLocked() { return locked; -} \ No newline at end of file +} diff --git a/src/protocols/SinglePixel.cpp b/src/protocols/SinglePixel.cpp index 41771ce2..91154671 100644 --- a/src/protocols/SinglePixel.cpp +++ b/src/protocols/SinglePixel.cpp @@ -1,4 +1,5 @@ #include "SinglePixel.hpp" +#include "../desktop/LayerSurface.hpp" #include #include "render/Renderer.hpp" diff --git a/src/protocols/Tablet.cpp b/src/protocols/Tablet.cpp index b4ab6ea0..2fdd8731 100644 --- a/src/protocols/Tablet.cpp +++ b/src/protocols/Tablet.cpp @@ -2,6 +2,7 @@ #include "../devices/Tablet.hpp" #include "../Compositor.hpp" #include "../managers/SeatManager.hpp" +#include "../managers/input/InputManager.hpp" #include "core/Seat.hpp" #include "core/Compositor.hpp" #include diff --git a/src/protocols/TearingControl.cpp b/src/protocols/TearingControl.cpp index 66a4efd2..eb1a53cb 100644 --- a/src/protocols/TearingControl.cpp +++ b/src/protocols/TearingControl.cpp @@ -3,6 +3,7 @@ #include "../desktop/Window.hpp" #include "../Compositor.hpp" #include "core/Compositor.hpp" +#include "../managers/HookSystemManager.hpp" CTearingControlProtocol::CTearingControlProtocol(const wl_interface* iface, const int& ver, const std::string& name) : IWaylandProtocol(iface, ver, name) { static auto P = diff --git a/src/protocols/TextInputV1.cpp b/src/protocols/TextInputV1.cpp index 6395e158..b8eb5835 100644 --- a/src/protocols/TextInputV1.cpp +++ b/src/protocols/TextInputV1.cpp @@ -1,6 +1,5 @@ #include "TextInputV1.hpp" -#include "../Compositor.hpp" #include "core/Compositor.hpp" CTextInputV1::~CTextInputV1() { diff --git a/src/protocols/ToplevelExport.cpp b/src/protocols/ToplevelExport.cpp index 73e5cad9..8e34cf4b 100644 --- a/src/protocols/ToplevelExport.cpp +++ b/src/protocols/ToplevelExport.cpp @@ -6,6 +6,9 @@ #include "types/WLBuffer.hpp" #include "types/Buffer.hpp" #include "../helpers/Format.hpp" +#include "../managers/EventManager.hpp" +#include "../managers/input/InputManager.hpp" +#include "../render/Renderer.hpp" #include diff --git a/src/protocols/XDGOutput.cpp b/src/protocols/XDGOutput.cpp index deb87829..fadc48a1 100644 --- a/src/protocols/XDGOutput.cpp +++ b/src/protocols/XDGOutput.cpp @@ -1,7 +1,7 @@ #include "XDGOutput.hpp" -#include "../Compositor.hpp" #include "../config/ConfigValue.hpp" #include "../xwayland/XWayland.hpp" +#include "../managers/HookSystemManager.hpp" #include "core/Output.hpp" #define OUTPUT_MANAGER_VERSION 3 @@ -119,4 +119,4 @@ void CXDGOutput::sendDetails() { if (resource->version() < OUTPUT_DONE_DEPRECATED_SINCE_VERSION) resource->sendDone(); -} \ No newline at end of file +} diff --git a/src/protocols/XDGShell.cpp b/src/protocols/XDGShell.cpp index 6b7cb3c1..aabb225a 100644 --- a/src/protocols/XDGShell.cpp +++ b/src/protocols/XDGShell.cpp @@ -3,6 +3,7 @@ #include #include "../Compositor.hpp" #include "../managers/SeatManager.hpp" +#include "../helpers/Monitor.hpp" #include "core/Seat.hpp" #include "core/Compositor.hpp" #include "protocols/core/Output.hpp" diff --git a/src/protocols/core/DataDevice.cpp b/src/protocols/core/DataDevice.cpp index 722eb9fd..fd3cd1fa 100644 --- a/src/protocols/core/DataDevice.cpp +++ b/src/protocols/core/DataDevice.cpp @@ -9,6 +9,10 @@ #include "Compositor.hpp" #include "../../xwayland/XWayland.hpp" #include "../../xwayland/Server.hpp" +#include "../../managers/input/InputManager.hpp" +#include "../../managers/HookSystemManager.hpp" +#include "../../helpers/Monitor.hpp" +#include "../../render/Renderer.hpp" CWLDataOfferResource::CWLDataOfferResource(SP resource_, SP source_) : source(source_), resource(resource_) { if (!good()) diff --git a/src/protocols/core/Shm.cpp b/src/protocols/core/Shm.cpp index fddd4e9a..6365c5d6 100644 --- a/src/protocols/core/Shm.cpp +++ b/src/protocols/core/Shm.cpp @@ -5,8 +5,8 @@ #include #include "../../render/Texture.hpp" #include "../types/WLBuffer.hpp" -#include "../../Compositor.hpp" #include "../../helpers/Format.hpp" +#include "../../render/Renderer.hpp" CWLSHMBuffer::CWLSHMBuffer(SP pool_, uint32_t id, int32_t offset_, const Vector2D& size_, int32_t stride_, uint32_t fmt_) { if (!pool_->pool->data) diff --git a/src/protocols/types/DMABuffer.cpp b/src/protocols/types/DMABuffer.cpp index ae684424..9f31f6a2 100644 --- a/src/protocols/types/DMABuffer.cpp +++ b/src/protocols/types/DMABuffer.cpp @@ -1,5 +1,6 @@ #include "DMABuffer.hpp" #include "WLBuffer.hpp" +#include "../../desktop/LayerSurface.hpp" #include "../../render/Renderer.hpp" #include "../../helpers/Format.hpp" diff --git a/src/protocols/types/WLBuffer.cpp b/src/protocols/types/WLBuffer.cpp index eb7d1fde..a9e6400a 100644 --- a/src/protocols/types/WLBuffer.cpp +++ b/src/protocols/types/WLBuffer.cpp @@ -3,7 +3,6 @@ #include "../core/Compositor.hpp" #include "../DRMSyncobj.hpp" #include "../../helpers/sync/SyncTimeline.hpp" -#include "../../Compositor.hpp" #include CWLBufferResource::CWLBufferResource(SP resource_) : resource(resource_) { diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index b68448ae..c5bb3620 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -2,12 +2,15 @@ #include #include "Shaders.hpp" #include "OpenGL.hpp" +#include "Renderer.hpp" #include "../Compositor.hpp" #include "../helpers/MiscFunctions.hpp" #include "../config/ConfigValue.hpp" #include "../desktop/LayerSurface.hpp" #include "../protocols/LayerShell.hpp" #include "../protocols/core/Compositor.hpp" +#include "../managers/HookSystemManager.hpp" +#include "../managers/input/InputManager.hpp" #include "pass/TexPassElement.hpp" #include "pass/RectPassElement.hpp" #include "pass/PreBlurElement.hpp" diff --git a/src/render/OpenGL.hpp b/src/render/OpenGL.hpp index 2b600a03..8098485e 100644 --- a/src/render/OpenGL.hpp +++ b/src/render/OpenGL.hpp @@ -17,7 +17,6 @@ #include "Shader.hpp" #include "Texture.hpp" #include "Framebuffer.hpp" -#include "Transformer.hpp" #include "Renderbuffer.hpp" #include "pass/Pass.hpp" diff --git a/src/render/Renderbuffer.cpp b/src/render/Renderbuffer.cpp index c4425ce9..887f31a9 100644 --- a/src/render/Renderbuffer.cpp +++ b/src/render/Renderbuffer.cpp @@ -1,4 +1,5 @@ #include "Renderbuffer.hpp" +#include "Renderer.hpp" #include "OpenGL.hpp" #include "../Compositor.hpp" #include "../protocols/types/Buffer.hpp" @@ -76,4 +77,4 @@ void CRenderbuffer::unbind() { CFramebuffer* CRenderbuffer::getFB() { return &m_sFramebuffer; -} \ No newline at end of file +} diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 6c77b27a..fddb9a9a 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -8,6 +8,10 @@ #include "../config/ConfigValue.hpp" #include "../managers/CursorManager.hpp" #include "../managers/PointerManager.hpp" +#include "../managers/input/InputManager.hpp" +#include "../managers/HookSystemManager.hpp" +#include "../managers/AnimationManager.hpp" +#include "../managers/LayoutManager.hpp" #include "../desktop/Window.hpp" #include "../desktop/LayerSurface.hpp" #include "../protocols/SessionLock.hpp" @@ -19,6 +23,9 @@ #include "../protocols/DRMSyncobj.hpp" #include "../protocols/LinuxDMABUF.hpp" #include "../helpers/sync/SyncTimeline.hpp" +#include "../hyprerror/HyprError.hpp" +#include "../debug/HyprDebugOverlay.hpp" +#include "../debug/HyprNotificationOverlay.hpp" #include "pass/TexPassElement.hpp" #include "pass/ClearPassElement.hpp" #include "pass/RectPassElement.hpp" diff --git a/src/render/Renderer.hpp b/src/render/Renderer.hpp index 8b4988c3..6ba7a654 100644 --- a/src/render/Renderer.hpp +++ b/src/render/Renderer.hpp @@ -3,6 +3,7 @@ #include "../defines.hpp" #include #include "../helpers/Monitor.hpp" +#include "../desktop/LayerSurface.hpp" #include "OpenGL.hpp" #include "Renderbuffer.hpp" #include "../helpers/Timer.hpp" diff --git a/src/render/decorations/CHyprBorderDecoration.cpp b/src/render/decorations/CHyprBorderDecoration.cpp index 7261431f..6fb0ff88 100644 --- a/src/render/decorations/CHyprBorderDecoration.cpp +++ b/src/render/decorations/CHyprBorderDecoration.cpp @@ -3,6 +3,8 @@ #include "../../config/ConfigValue.hpp" #include "../../managers/eventLoop/EventLoopManager.hpp" #include "../pass/BorderPassElement.hpp" +#include "../Renderer.hpp" +#include "../../managers/HookSystemManager.hpp" CHyprBorderDecoration::CHyprBorderDecoration(PHLWINDOW pWindow) : IHyprWindowDecoration(pWindow), m_pWindow(pWindow) { ; diff --git a/src/render/decorations/CHyprDropShadowDecoration.cpp b/src/render/decorations/CHyprDropShadowDecoration.cpp index ddd5198d..022e123e 100644 --- a/src/render/decorations/CHyprDropShadowDecoration.cpp +++ b/src/render/decorations/CHyprDropShadowDecoration.cpp @@ -3,6 +3,7 @@ #include "../../Compositor.hpp" #include "../../config/ConfigValue.hpp" #include "../pass/ShadowPassElement.hpp" +#include "../Renderer.hpp" CHyprDropShadowDecoration::CHyprDropShadowDecoration(PHLWINDOW pWindow) : IHyprWindowDecoration(pWindow), m_pWindow(pWindow) { ; diff --git a/src/render/decorations/CHyprGroupBarDecoration.cpp b/src/render/decorations/CHyprGroupBarDecoration.cpp index 970273d7..4a411b6c 100644 --- a/src/render/decorations/CHyprGroupBarDecoration.cpp +++ b/src/render/decorations/CHyprGroupBarDecoration.cpp @@ -6,6 +6,8 @@ #include #include "../pass/TexPassElement.hpp" #include "../pass/RectPassElement.hpp" +#include "../Renderer.hpp" +#include "../../managers/input/InputManager.hpp" // shared things to conserve VRAM static SP m_tGradientActive = makeShared(); diff --git a/src/render/decorations/DecorationPositioner.cpp b/src/render/decorations/DecorationPositioner.cpp index abfa19ec..c2d34fb6 100644 --- a/src/render/decorations/DecorationPositioner.cpp +++ b/src/render/decorations/DecorationPositioner.cpp @@ -1,5 +1,7 @@ #include "DecorationPositioner.hpp" -#include "../../Compositor.hpp" +#include "../../desktop/Window.hpp" +#include "../../managers/HookSystemManager.hpp" +#include "../../managers/LayoutManager.hpp" CDecorationPositioner::CDecorationPositioner() { static auto P = g_pHookSystem->hookDynamic("closeWindow", [this](void* call, SCallbackInfo& info, std::any data) { diff --git a/src/render/pass/Pass.cpp b/src/render/pass/Pass.cpp index b72248c2..5b133b7d 100644 --- a/src/render/pass/Pass.cpp +++ b/src/render/pass/Pass.cpp @@ -6,6 +6,7 @@ #include "../../desktop/WLSurface.hpp" #include "../../managers/SeatManager.hpp" #include "../../managers/eventLoop/EventLoopManager.hpp" +#include "../../render/Renderer.hpp" #include "../../Compositor.hpp" bool CRenderPass::empty() const { diff --git a/src/render/pass/SurfacePassElement.cpp b/src/render/pass/SurfacePassElement.cpp index 71aa26be..d720081f 100644 --- a/src/render/pass/SurfacePassElement.cpp +++ b/src/render/pass/SurfacePassElement.cpp @@ -1,6 +1,7 @@ #include "SurfacePassElement.hpp" #include "../OpenGL.hpp" #include "../../desktop/WLSurface.hpp" +#include "../../desktop/Window.hpp" #include "../../protocols/core/Compositor.hpp" #include "../../protocols/DRMSyncobj.hpp" #include "../../managers/input/InputManager.hpp" diff --git a/src/xwayland/XSurface.cpp b/src/xwayland/XSurface.cpp index 6048269a..b5ee75f6 100644 --- a/src/xwayland/XSurface.cpp +++ b/src/xwayland/XSurface.cpp @@ -6,7 +6,6 @@ #ifndef NO_XWAYLAND #include -#include "../Compositor.hpp" CXWaylandSurface::CXWaylandSurface(uint32_t xID_, CBox geometry_, bool OR) : xID(xID_), geometry(geometry_), overrideRedirect(OR) { xcb_res_query_client_ids_cookie_t client_id_cookie = {0}; diff --git a/src/xwayland/XWM.hpp b/src/xwayland/XWM.hpp index 38fdab94..bc5aa47b 100644 --- a/src/xwayland/XWM.hpp +++ b/src/xwayland/XWM.hpp @@ -1,6 +1,5 @@ #pragma once -#include "../macros.hpp" #include "XDataSource.hpp" #include "Dnd.hpp" #include "../helpers/memory/Memory.hpp"