diff --git a/src/Compositor.hpp b/src/Compositor.hpp index 56b83774..e226fdd3 100644 --- a/src/Compositor.hpp +++ b/src/Compositor.hpp @@ -22,7 +22,7 @@ #include "debug/HyprNotificationOverlay.hpp" #include "helpers/Monitor.hpp" #include "desktop/Workspace.hpp" -#include "Window.hpp" +#include "desktop/Window.hpp" #include "render/Renderer.hpp" #include "render/OpenGL.hpp" #include "hyprerror/HyprError.hpp" diff --git a/src/config/ConfigManager.hpp b/src/config/ConfigManager.hpp index 2effb644..a00aaec9 100644 --- a/src/config/ConfigManager.hpp +++ b/src/config/ConfigManager.hpp @@ -13,7 +13,6 @@ #include #include #include -#include "../Window.hpp" #include "../helpers/WLClasses.hpp" #include "../helpers/Monitor.hpp" #include "../helpers/VarList.hpp" @@ -28,6 +27,8 @@ #define HANDLE void* +class CWindow; + struct SWorkspaceRule { std::string monitor = ""; std::string workspaceString = ""; diff --git a/src/Window.cpp b/src/desktop/Window.cpp similarity index 99% rename from src/Window.cpp rename to src/desktop/Window.cpp index 8130f017..567c3243 100644 --- a/src/Window.cpp +++ b/src/desktop/Window.cpp @@ -1,9 +1,9 @@ #include "Window.hpp" -#include "Compositor.hpp" -#include "render/decorations/CHyprDropShadowDecoration.hpp" -#include "render/decorations/CHyprGroupBarDecoration.hpp" -#include "render/decorations/CHyprBorderDecoration.hpp" -#include "config/ConfigValue.hpp" +#include "../Compositor.hpp" +#include "../render/decorations/CHyprDropShadowDecoration.hpp" +#include "../render/decorations/CHyprGroupBarDecoration.hpp" +#include "../render/decorations/CHyprBorderDecoration.hpp" +#include "../config/ConfigValue.hpp" CWindow::CWindow() { m_vRealPosition.create(g_pConfigManager->getAnimationPropertyConfig("windowsIn"), (void*)this, AVARDAMAGE_ENTIRE); diff --git a/src/Window.hpp b/src/desktop/Window.hpp similarity index 97% rename from src/Window.hpp rename to src/desktop/Window.hpp index d98bc921..3ec8a54c 100644 --- a/src/Window.hpp +++ b/src/desktop/Window.hpp @@ -1,16 +1,16 @@ #pragma once -#include "defines.hpp" -#include "desktop/Subsurface.hpp" -#include "helpers/AnimatedVariable.hpp" -#include "render/decorations/IHyprWindowDecoration.hpp" +#include "../defines.hpp" +#include "Subsurface.hpp" +#include "../helpers/AnimatedVariable.hpp" +#include "../render/decorations/IHyprWindowDecoration.hpp" #include -#include "config/ConfigDataValues.hpp" -#include "helpers/Vector2D.hpp" -#include "desktop/WLSurface.hpp" -#include "desktop/Popup.hpp" -#include "macros.hpp" -#include "managers/XWaylandManager.hpp" +#include "../config/ConfigDataValues.hpp" +#include "../helpers/Vector2D.hpp" +#include "WLSurface.hpp" +#include "Popup.hpp" +#include "../macros.hpp" +#include "../managers/XWaylandManager.hpp" enum eIdleInhibitMode { IDLEINHIBIT_NONE = 0, diff --git a/src/helpers/WLClasses.hpp b/src/helpers/WLClasses.hpp index 57f216b8..806bf778 100644 --- a/src/helpers/WLClasses.hpp +++ b/src/helpers/WLClasses.hpp @@ -3,7 +3,7 @@ #include "../events/Events.hpp" #include "../defines.hpp" #include "wlr-layer-shell-unstable-v1-protocol.h" -#include "../Window.hpp" +#include "../desktop/Window.hpp" #include "../desktop/Subsurface.hpp" #include "../desktop/Popup.hpp" #include "AnimatedVariable.hpp" diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp index 02f39d94..6a32144e 100644 --- a/src/layout/IHyprLayout.cpp +++ b/src/layout/IHyprLayout.cpp @@ -3,6 +3,7 @@ #include "../Compositor.hpp" #include "../render/decorations/CHyprGroupBarDecoration.hpp" #include "../config/ConfigValue.hpp" +#include "../desktop/Window.hpp" void IHyprLayout::onWindowCreated(CWindow* pWindow, eDirection direction) { if (pWindow->m_bIsFloating) { diff --git a/src/layout/IHyprLayout.hpp b/src/layout/IHyprLayout.hpp index d3f8dfa6..b5926a07 100644 --- a/src/layout/IHyprLayout.hpp +++ b/src/layout/IHyprLayout.hpp @@ -1,9 +1,10 @@ #pragma once #include "../defines.hpp" -#include "../Window.hpp" #include +class CWindow; + struct SWindowRenderLayoutHints { bool isBorderGradient = false; CGradientValueData* borderGradient; diff --git a/src/managers/AnimationManager.cpp b/src/managers/AnimationManager.cpp index f9dfa6fa..7d2a86e7 100644 --- a/src/managers/AnimationManager.cpp +++ b/src/managers/AnimationManager.cpp @@ -3,6 +3,7 @@ #include "HookSystemManager.hpp" #include "macros.hpp" #include "../config/ConfigValue.hpp" +#include "../desktop/Window.hpp" int wlTick(void* data) { if (g_pAnimationManager) diff --git a/src/managers/AnimationManager.hpp b/src/managers/AnimationManager.hpp index ae82a60b..483c9813 100644 --- a/src/managers/AnimationManager.hpp +++ b/src/managers/AnimationManager.hpp @@ -5,9 +5,10 @@ #include #include "../helpers/AnimatedVariable.hpp" #include "../helpers/BezierCurve.hpp" -#include "../Window.hpp" #include "../helpers/Timer.hpp" +class CWindow; + class CAnimationManager { public: CAnimationManager(); diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 9072f27a..04981e4e 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -3,6 +3,7 @@ #include "wlr/types/wlr_switch.h" #include #include "../../config/ConfigValue.hpp" +#include "../../desktop/Window.hpp" CInputManager::~CInputManager() { m_vConstraints.clear(); diff --git a/src/managers/input/InputManager.hpp b/src/managers/input/InputManager.hpp index d63de6ef..128badfc 100644 --- a/src/managers/input/InputManager.hpp +++ b/src/managers/input/InputManager.hpp @@ -3,11 +3,11 @@ #include "../../defines.hpp" #include #include "../../helpers/WLClasses.hpp" -#include "../../Window.hpp" #include "../../helpers/Timer.hpp" #include "InputMethodRelay.hpp" class CConstraint; +class CWindow; enum eClickBehaviorMode { CLICKMODE_DEFAULT = 0, diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index e2bcbf1e..88035112 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -5,6 +5,7 @@ #include #include "../config/ConfigValue.hpp" #include "../managers/CursorManager.hpp" +#include "../desktop/Window.hpp" extern "C" { #include diff --git a/src/render/Renderer.hpp b/src/render/Renderer.hpp index e480b26d..fd41a566 100644 --- a/src/render/Renderer.hpp +++ b/src/render/Renderer.hpp @@ -3,7 +3,6 @@ #include "../defines.hpp" #include #include "../helpers/Monitor.hpp" -#include "../Window.hpp" #include "OpenGL.hpp" #include "Renderbuffer.hpp" #include "../helpers/Timer.hpp" @@ -11,6 +10,7 @@ struct SMonitorRule; class CWorkspace; +class CWindow; // TODO: add fuller damage tracking for updating only parts of a window enum DAMAGETRACKINGMODES { diff --git a/src/render/decorations/IHyprWindowDecoration.cpp b/src/render/decorations/IHyprWindowDecoration.cpp index 973f2700..a012848a 100644 --- a/src/render/decorations/IHyprWindowDecoration.cpp +++ b/src/render/decorations/IHyprWindowDecoration.cpp @@ -1,6 +1,6 @@ #include "IHyprWindowDecoration.hpp" -#include "../../Window.hpp" +class CWindow; IHyprWindowDecoration::IHyprWindowDecoration(CWindow* pWindow) { m_pWindow = pWindow;