refactor: move window.hpp to desktop/

This commit is contained in:
Vaxry 2024-03-20 01:44:51 +00:00
parent f6038837bc
commit 8593c45be3
14 changed files with 30 additions and 23 deletions

View file

@ -22,7 +22,7 @@
#include "debug/HyprNotificationOverlay.hpp" #include "debug/HyprNotificationOverlay.hpp"
#include "helpers/Monitor.hpp" #include "helpers/Monitor.hpp"
#include "desktop/Workspace.hpp" #include "desktop/Workspace.hpp"
#include "Window.hpp" #include "desktop/Window.hpp"
#include "render/Renderer.hpp" #include "render/Renderer.hpp"
#include "render/OpenGL.hpp" #include "render/OpenGL.hpp"
#include "hyprerror/HyprError.hpp" #include "hyprerror/HyprError.hpp"

View file

@ -13,7 +13,6 @@
#include <optional> #include <optional>
#include <functional> #include <functional>
#include <xf86drmMode.h> #include <xf86drmMode.h>
#include "../Window.hpp"
#include "../helpers/WLClasses.hpp" #include "../helpers/WLClasses.hpp"
#include "../helpers/Monitor.hpp" #include "../helpers/Monitor.hpp"
#include "../helpers/VarList.hpp" #include "../helpers/VarList.hpp"
@ -28,6 +27,8 @@
#define HANDLE void* #define HANDLE void*
class CWindow;
struct SWorkspaceRule { struct SWorkspaceRule {
std::string monitor = ""; std::string monitor = "";
std::string workspaceString = ""; std::string workspaceString = "";

View file

@ -1,9 +1,9 @@
#include "Window.hpp" #include "Window.hpp"
#include "Compositor.hpp" #include "../Compositor.hpp"
#include "render/decorations/CHyprDropShadowDecoration.hpp" #include "../render/decorations/CHyprDropShadowDecoration.hpp"
#include "render/decorations/CHyprGroupBarDecoration.hpp" #include "../render/decorations/CHyprGroupBarDecoration.hpp"
#include "render/decorations/CHyprBorderDecoration.hpp" #include "../render/decorations/CHyprBorderDecoration.hpp"
#include "config/ConfigValue.hpp" #include "../config/ConfigValue.hpp"
CWindow::CWindow() { CWindow::CWindow() {
m_vRealPosition.create(g_pConfigManager->getAnimationPropertyConfig("windowsIn"), (void*)this, AVARDAMAGE_ENTIRE); m_vRealPosition.create(g_pConfigManager->getAnimationPropertyConfig("windowsIn"), (void*)this, AVARDAMAGE_ENTIRE);

View file

@ -1,16 +1,16 @@
#pragma once #pragma once
#include "defines.hpp" #include "../defines.hpp"
#include "desktop/Subsurface.hpp" #include "Subsurface.hpp"
#include "helpers/AnimatedVariable.hpp" #include "../helpers/AnimatedVariable.hpp"
#include "render/decorations/IHyprWindowDecoration.hpp" #include "../render/decorations/IHyprWindowDecoration.hpp"
#include <deque> #include <deque>
#include "config/ConfigDataValues.hpp" #include "../config/ConfigDataValues.hpp"
#include "helpers/Vector2D.hpp" #include "../helpers/Vector2D.hpp"
#include "desktop/WLSurface.hpp" #include "WLSurface.hpp"
#include "desktop/Popup.hpp" #include "Popup.hpp"
#include "macros.hpp" #include "../macros.hpp"
#include "managers/XWaylandManager.hpp" #include "../managers/XWaylandManager.hpp"
enum eIdleInhibitMode { enum eIdleInhibitMode {
IDLEINHIBIT_NONE = 0, IDLEINHIBIT_NONE = 0,

View file

@ -3,7 +3,7 @@
#include "../events/Events.hpp" #include "../events/Events.hpp"
#include "../defines.hpp" #include "../defines.hpp"
#include "wlr-layer-shell-unstable-v1-protocol.h" #include "wlr-layer-shell-unstable-v1-protocol.h"
#include "../Window.hpp" #include "../desktop/Window.hpp"
#include "../desktop/Subsurface.hpp" #include "../desktop/Subsurface.hpp"
#include "../desktop/Popup.hpp" #include "../desktop/Popup.hpp"
#include "AnimatedVariable.hpp" #include "AnimatedVariable.hpp"

View file

@ -3,6 +3,7 @@
#include "../Compositor.hpp" #include "../Compositor.hpp"
#include "../render/decorations/CHyprGroupBarDecoration.hpp" #include "../render/decorations/CHyprGroupBarDecoration.hpp"
#include "../config/ConfigValue.hpp" #include "../config/ConfigValue.hpp"
#include "../desktop/Window.hpp"
void IHyprLayout::onWindowCreated(CWindow* pWindow, eDirection direction) { void IHyprLayout::onWindowCreated(CWindow* pWindow, eDirection direction) {
if (pWindow->m_bIsFloating) { if (pWindow->m_bIsFloating) {

View file

@ -1,9 +1,10 @@
#pragma once #pragma once
#include "../defines.hpp" #include "../defines.hpp"
#include "../Window.hpp"
#include <any> #include <any>
class CWindow;
struct SWindowRenderLayoutHints { struct SWindowRenderLayoutHints {
bool isBorderGradient = false; bool isBorderGradient = false;
CGradientValueData* borderGradient; CGradientValueData* borderGradient;

View file

@ -3,6 +3,7 @@
#include "HookSystemManager.hpp" #include "HookSystemManager.hpp"
#include "macros.hpp" #include "macros.hpp"
#include "../config/ConfigValue.hpp" #include "../config/ConfigValue.hpp"
#include "../desktop/Window.hpp"
int wlTick(void* data) { int wlTick(void* data) {
if (g_pAnimationManager) if (g_pAnimationManager)

View file

@ -5,9 +5,10 @@
#include <unordered_map> #include <unordered_map>
#include "../helpers/AnimatedVariable.hpp" #include "../helpers/AnimatedVariable.hpp"
#include "../helpers/BezierCurve.hpp" #include "../helpers/BezierCurve.hpp"
#include "../Window.hpp"
#include "../helpers/Timer.hpp" #include "../helpers/Timer.hpp"
class CWindow;
class CAnimationManager { class CAnimationManager {
public: public:
CAnimationManager(); CAnimationManager();

View file

@ -3,6 +3,7 @@
#include "wlr/types/wlr_switch.h" #include "wlr/types/wlr_switch.h"
#include <ranges> #include <ranges>
#include "../../config/ConfigValue.hpp" #include "../../config/ConfigValue.hpp"
#include "../../desktop/Window.hpp"
CInputManager::~CInputManager() { CInputManager::~CInputManager() {
m_vConstraints.clear(); m_vConstraints.clear();

View file

@ -3,11 +3,11 @@
#include "../../defines.hpp" #include "../../defines.hpp"
#include <list> #include <list>
#include "../../helpers/WLClasses.hpp" #include "../../helpers/WLClasses.hpp"
#include "../../Window.hpp"
#include "../../helpers/Timer.hpp" #include "../../helpers/Timer.hpp"
#include "InputMethodRelay.hpp" #include "InputMethodRelay.hpp"
class CConstraint; class CConstraint;
class CWindow;
enum eClickBehaviorMode { enum eClickBehaviorMode {
CLICKMODE_DEFAULT = 0, CLICKMODE_DEFAULT = 0,

View file

@ -5,6 +5,7 @@
#include <algorithm> #include <algorithm>
#include "../config/ConfigValue.hpp" #include "../config/ConfigValue.hpp"
#include "../managers/CursorManager.hpp" #include "../managers/CursorManager.hpp"
#include "../desktop/Window.hpp"
extern "C" { extern "C" {
#include <xf86drm.h> #include <xf86drm.h>

View file

@ -3,7 +3,6 @@
#include "../defines.hpp" #include "../defines.hpp"
#include <list> #include <list>
#include "../helpers/Monitor.hpp" #include "../helpers/Monitor.hpp"
#include "../Window.hpp"
#include "OpenGL.hpp" #include "OpenGL.hpp"
#include "Renderbuffer.hpp" #include "Renderbuffer.hpp"
#include "../helpers/Timer.hpp" #include "../helpers/Timer.hpp"
@ -11,6 +10,7 @@
struct SMonitorRule; struct SMonitorRule;
class CWorkspace; class CWorkspace;
class CWindow;
// TODO: add fuller damage tracking for updating only parts of a window // TODO: add fuller damage tracking for updating only parts of a window
enum DAMAGETRACKINGMODES { enum DAMAGETRACKINGMODES {

View file

@ -1,6 +1,6 @@
#include "IHyprWindowDecoration.hpp" #include "IHyprWindowDecoration.hpp"
#include "../../Window.hpp" class CWindow;
IHyprWindowDecoration::IHyprWindowDecoration(CWindow* pWindow) { IHyprWindowDecoration::IHyprWindowDecoration(CWindow* pWindow) {
m_pWindow = pWindow; m_pWindow = pWindow;