From b39dcfa497f84486569bf862092dfcfadbfd8747 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Thu, 29 Feb 2024 13:03:38 +0000 Subject: [PATCH] refactor: move a few things to desktop/ --- src/Compositor.hpp | 2 +- src/Window.hpp | 4 ++-- src/{helpers => desktop}/Subsurface.cpp | 0 src/{helpers => desktop}/Subsurface.hpp | 2 ++ src/{helpers => desktop}/WLSurface.cpp | 0 src/{helpers => desktop}/WLSurface.hpp | 2 +- src/{helpers => desktop}/Workspace.cpp | 0 src/{helpers => desktop}/Workspace.hpp | 2 +- src/helpers/WLClasses.hpp | 4 ++-- src/render/Renderer.hpp | 2 +- 10 files changed, 10 insertions(+), 8 deletions(-) rename src/{helpers => desktop}/Subsurface.cpp (100%) rename src/{helpers => desktop}/Subsurface.hpp (98%) rename src/{helpers => desktop}/WLSurface.cpp (100%) rename src/{helpers => desktop}/WLSurface.hpp (98%) rename src/{helpers => desktop}/Workspace.cpp (100%) rename src/{helpers => desktop}/Workspace.hpp (97%) diff --git a/src/Compositor.hpp b/src/Compositor.hpp index 491aee71..92573669 100644 --- a/src/Compositor.hpp +++ b/src/Compositor.hpp @@ -21,7 +21,7 @@ #include "debug/HyprDebugOverlay.hpp" #include "debug/HyprNotificationOverlay.hpp" #include "helpers/Monitor.hpp" -#include "helpers/Workspace.hpp" +#include "desktop/Workspace.hpp" #include "Window.hpp" #include "render/Renderer.hpp" #include "render/OpenGL.hpp" diff --git a/src/Window.hpp b/src/Window.hpp index 2d7bc986..476cb1c5 100644 --- a/src/Window.hpp +++ b/src/Window.hpp @@ -1,13 +1,13 @@ #pragma once #include "defines.hpp" -#include "helpers/Subsurface.hpp" +#include "desktop/Subsurface.hpp" #include "helpers/AnimatedVariable.hpp" #include "render/decorations/IHyprWindowDecoration.hpp" #include #include "config/ConfigDataValues.hpp" #include "helpers/Vector2D.hpp" -#include "helpers/WLSurface.hpp" +#include "desktop/WLSurface.hpp" #include "macros.hpp" #include "managers/XWaylandManager.hpp" diff --git a/src/helpers/Subsurface.cpp b/src/desktop/Subsurface.cpp similarity index 100% rename from src/helpers/Subsurface.cpp rename to src/desktop/Subsurface.cpp diff --git a/src/helpers/Subsurface.hpp b/src/desktop/Subsurface.hpp similarity index 98% rename from src/helpers/Subsurface.hpp rename to src/desktop/Subsurface.hpp index a8f028af..22692192 100644 --- a/src/helpers/Subsurface.hpp +++ b/src/desktop/Subsurface.hpp @@ -5,6 +5,7 @@ #include "WLSurface.hpp" class CWindow; +struct SXDGPopup; class CSubsurface { public: @@ -28,6 +29,7 @@ class CSubsurface { void recheckDamageForSubsurfaces(); private: + DYNLISTENER(destroySubsurface); DYNLISTENER(commitSubsurface); DYNLISTENER(newSubsurface); diff --git a/src/helpers/WLSurface.cpp b/src/desktop/WLSurface.cpp similarity index 100% rename from src/helpers/WLSurface.cpp rename to src/desktop/WLSurface.cpp diff --git a/src/helpers/WLSurface.hpp b/src/desktop/WLSurface.hpp similarity index 98% rename from src/helpers/WLSurface.hpp rename to src/desktop/WLSurface.hpp index eab4ac48..15debd56 100644 --- a/src/helpers/WLSurface.hpp +++ b/src/desktop/WLSurface.hpp @@ -1,7 +1,7 @@ #pragma once #include "../defines.hpp" -#include "Region.hpp" +#include "../helpers/Region.hpp" class CWindow; diff --git a/src/helpers/Workspace.cpp b/src/desktop/Workspace.cpp similarity index 100% rename from src/helpers/Workspace.cpp rename to src/desktop/Workspace.cpp diff --git a/src/helpers/Workspace.hpp b/src/desktop/Workspace.hpp similarity index 97% rename from src/helpers/Workspace.hpp rename to src/desktop/Workspace.hpp index a0bbb815..d4915769 100644 --- a/src/helpers/Workspace.hpp +++ b/src/desktop/Workspace.hpp @@ -1,6 +1,6 @@ #pragma once -#include "AnimatedVariable.hpp" +#include "../helpers/AnimatedVariable.hpp" #include #include "../defines.hpp" diff --git a/src/helpers/WLClasses.hpp b/src/helpers/WLClasses.hpp index c1110eaa..e536c3d2 100644 --- a/src/helpers/WLClasses.hpp +++ b/src/helpers/WLClasses.hpp @@ -4,9 +4,9 @@ #include "../defines.hpp" #include "wlr-layer-shell-unstable-v1-protocol.h" #include "../Window.hpp" -#include "Subsurface.hpp" +#include "../desktop/Subsurface.hpp" #include "AnimatedVariable.hpp" -#include "WLSurface.hpp" +#include "../desktop/WLSurface.hpp" #include "Region.hpp" struct SLayerRule { diff --git a/src/render/Renderer.hpp b/src/render/Renderer.hpp index 5eafb639..53cace82 100644 --- a/src/render/Renderer.hpp +++ b/src/render/Renderer.hpp @@ -3,7 +3,6 @@ #include "../defines.hpp" #include #include "../helpers/Monitor.hpp" -#include "../helpers/Workspace.hpp" #include "../Window.hpp" #include "OpenGL.hpp" #include "Renderbuffer.hpp" @@ -11,6 +10,7 @@ #include "../helpers/Region.hpp" struct SMonitorRule; +class CWorkspace; // TODO: add fuller damage tracking for updating only parts of a window enum DAMAGETRACKINGMODES {