diff options
author | Vaxry <[email protected]> | 2024-10-19 23:03:29 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-10-19 23:03:29 +0100 |
commit | f044e4c9514ec89c4c1fc8a523ca90b8cb907fb7 (patch) | |
tree | 5fa2ba17c08d522b7bb3f6564761b4aaedc532d0 /src/Compositor.hpp | |
parent | ce3ba798df6bca5be1da4396644a9ef08a2acab4 (diff) | |
download | Hyprland-f044e4c9514ec89c4c1fc8a523ca90b8cb907fb7.tar.gz Hyprland-f044e4c9514ec89c4c1fc8a523ca90b8cb907fb7.zip |
internal: Move CMonitor to SP (#8178)
* move monitors to sp
* XD
Diffstat (limited to 'src/Compositor.hpp')
-rw-r--r-- | src/Compositor.hpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/Compositor.hpp b/src/Compositor.hpp index a57450f1..7fbd32e8 100644 --- a/src/Compositor.hpp +++ b/src/Compositor.hpp @@ -89,7 +89,7 @@ class CCompositor { bool m_bDPMSStateON = true; bool m_bUnsafeState = false; // unsafe state is when there is no monitors. bool m_bNextIsUnsafe = false; - CMonitor* m_pUnsafeOutput = nullptr; // fallback output for the unsafe state + PHLMONITORREF m_pUnsafeOutput; // fallback output for the unsafe state bool m_bIsShuttingDown = false; bool m_bFinalRequests = false; bool m_bDesktopEnvSet = false; @@ -97,22 +97,22 @@ class CCompositor { // ------------------------------------------------- // - CMonitor* getMonitorFromID(const MONITORID&); - CMonitor* getMonitorFromName(const std::string&); - CMonitor* getMonitorFromDesc(const std::string&); - CMonitor* getMonitorFromCursor(); - CMonitor* getMonitorFromVector(const Vector2D&); + PHLMONITOR getMonitorFromID(const MONITORID&); + PHLMONITOR getMonitorFromName(const std::string&); + PHLMONITOR getMonitorFromDesc(const std::string&); + PHLMONITOR getMonitorFromCursor(); + PHLMONITOR getMonitorFromVector(const Vector2D&); void removeWindowFromVectorSafe(PHLWINDOW); void focusWindow(PHLWINDOW, SP<CWLSurfaceResource> pSurface = nullptr); void focusSurface(SP<CWLSurfaceResource>, PHLWINDOW pWindowOwner = nullptr); - bool monitorExists(CMonitor*); + bool monitorExists(PHLMONITOR); PHLWINDOW vectorToWindowUnified(const Vector2D&, uint8_t properties, PHLWINDOW pIgnoreWindow = nullptr); SP<CWLSurfaceResource> vectorToLayerSurface(const Vector2D&, std::vector<PHLLSREF>*, Vector2D*, PHLLS*); - SP<CWLSurfaceResource> vectorToLayerPopupSurface(const Vector2D&, CMonitor* monitor, Vector2D*, PHLLS*); + SP<CWLSurfaceResource> vectorToLayerPopupSurface(const Vector2D&, PHLMONITOR monitor, Vector2D*, PHLLS*); SP<CWLSurfaceResource> vectorWindowToSurface(const Vector2D&, PHLWINDOW, Vector2D& sl); Vector2D vectorToSurfaceLocal(const Vector2D&, PHLWINDOW, SP<CWLSurfaceResource>); - CMonitor* getMonitorFromOutput(SP<Aquamarine::IOutput>); - CMonitor* getRealMonitorFromOutput(SP<Aquamarine::IOutput>); + PHLMONITOR getMonitorFromOutput(SP<Aquamarine::IOutput>); + PHLMONITOR getRealMonitorFromOutput(SP<Aquamarine::IOutput>); PHLWINDOW getWindowFromSurface(SP<CWLSurfaceResource>); PHLWINDOW getWindowFromHandle(uint32_t); bool isWorkspaceVisible(PHLWORKSPACE); @@ -138,16 +138,16 @@ class CCompositor { PHLWINDOW getPrevWindowOnWorkspace(PHLWINDOW, bool focusableOnly = false, std::optional<bool> floating = {}); WORKSPACEID getNextAvailableNamedWorkspace(); bool isPointOnAnyMonitor(const Vector2D&); - bool isPointOnReservedArea(const Vector2D& point, const CMonitor* monitor = nullptr); - CMonitor* getMonitorInDirection(const char&); - CMonitor* getMonitorInDirection(CMonitor*, const char&); + bool isPointOnReservedArea(const Vector2D& point, const PHLMONITOR monitor = nullptr); + PHLMONITOR getMonitorInDirection(const char&); + PHLMONITOR getMonitorInDirection(PHLMONITOR, const char&); void updateAllWindowsAnimatedDecorationValues(); void updateWorkspaceWindows(const WORKSPACEID& id); void updateWindowAnimatedDecorationValues(PHLWINDOW); MONITORID getNextAvailableMonitorID(std::string const& name); - void moveWorkspaceToMonitor(PHLWORKSPACE, CMonitor*, bool noWarpCursor = false); - void swapActiveWorkspaces(CMonitor*, CMonitor*); - CMonitor* getMonitorFromString(const std::string&); + void moveWorkspaceToMonitor(PHLWORKSPACE, PHLMONITOR, bool noWarpCursor = false); + void swapActiveWorkspaces(PHLMONITOR, PHLMONITOR); + PHLMONITOR getMonitorFromString(const std::string&); bool workspaceIDOutOfBounds(const WORKSPACEID&); void setWindowFullscreenInternal(const PHLWINDOW PWINDOW, const eFullscreenMode MODE); void setWindowFullscreenClient(const PHLWINDOW PWINDOW, const eFullscreenMode MODE); @@ -156,7 +156,7 @@ class CCompositor { void changeWindowFullscreenModeClient(const PHLWINDOW PWINDOW, const eFullscreenMode MODE, const bool ON); void updateFullscreenFadeOnWorkspace(PHLWORKSPACE); PHLWINDOW getX11Parent(PHLWINDOW); - void scheduleFrameForMonitor(CMonitor*, Aquamarine::IOutput::scheduleFrameReason reason = Aquamarine::IOutput::AQ_SCHEDULE_CLIENT_UNKNOWN); + void scheduleFrameForMonitor(PHLMONITOR, Aquamarine::IOutput::scheduleFrameReason reason = Aquamarine::IOutput::AQ_SCHEDULE_CLIENT_UNKNOWN); void addToFadingOutSafe(PHLLS); void removeFromFadingOutSafe(PHLLS); void addToFadingOutSafe(PHLWINDOW); @@ -169,7 +169,7 @@ class CCompositor { PHLWORKSPACE createNewWorkspace(const WORKSPACEID&, const MONITORID&, const std::string& name = "", bool isEmpty = true); // will be deleted next frame if left empty and unfocused! void renameWorkspace(const WORKSPACEID&, const std::string& name = ""); - void setActiveMonitor(CMonitor*); + void setActiveMonitor(PHLMONITOR); bool isWorkspaceSpecial(const WORKSPACEID&); WORKSPACEID getNewSpecialID(); void performUserChecks(); |