diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2024-04-02 20:32:39 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-02 20:32:39 +0100 |
| commit | ef23ef60c5641c5903f9cf40571ead7ad6aba1b9 (patch) | |
| tree | 2eece29849bf25d7710edd9cee5d12186a9253fc /src/Compositor.hpp | |
| parent | fc0a7af7ba5c52f7a70309020f5cb27c19d068e6 (diff) | |
Workspace/core: Refactor workspace storage (#5380)
* refactor workspaces to use ptrs
* clang-format
Diffstat (limited to 'src/Compositor.hpp')
| -rw-r--r-- | src/Compositor.hpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Compositor.hpp b/src/Compositor.hpp index ace2a388..98bbe899 100644 --- a/src/Compositor.hpp +++ b/src/Compositor.hpp @@ -92,7 +92,7 @@ class CCompositor { std::vector<std::shared_ptr<CMonitor>> m_vMonitors; std::vector<std::shared_ptr<CMonitor>> m_vRealMonitors; // for all monitors, even those turned off std::vector<std::unique_ptr<CWindow>> m_vWindows; - std::vector<std::unique_ptr<CWorkspace>> m_vWorkspaces; + std::vector<PHLWORKSPACE> m_vWorkspaces; std::vector<CWindow*> m_vWindowsFadingOut; std::vector<SLayerSurface*> m_vSurfacesFadingOut; @@ -145,9 +145,9 @@ class CCompositor { CWindow* getWindowFromHandle(uint32_t); CWindow* getWindowFromZWLRHandle(wl_resource*); bool isWorkspaceVisible(const int&); - CWorkspace* getWorkspaceByID(const int&); - CWorkspace* getWorkspaceByName(const std::string&); - CWorkspace* getWorkspaceByString(const std::string&); + PHLWORKSPACE getWorkspaceByID(const int&); + PHLWORKSPACE getWorkspaceByName(const std::string&); + PHLWORKSPACE getWorkspaceByString(const std::string&); void sanityCheckWorkspaces(); void updateWorkspaceWindowDecos(const int&); int getWindowsOnWorkspace(const int& id, std::optional<bool> onlyTiled = {}); @@ -172,12 +172,12 @@ class CCompositor { void updateWorkspaceWindows(const int64_t& id); void updateWindowAnimatedDecorationValues(CWindow*); int getNextAvailableMonitorID(std::string const& name); - void moveWorkspaceToMonitor(CWorkspace*, CMonitor*, bool noWarpCursor = false); + void moveWorkspaceToMonitor(PHLWORKSPACE, CMonitor*, bool noWarpCursor = false); void swapActiveWorkspaces(CMonitor*, CMonitor*); CMonitor* getMonitorFromString(const std::string&); bool workspaceIDOutOfBounds(const int64_t&); void setWindowFullscreen(CWindow*, bool, eFullscreenMode mode = FULLSCREEN_INVALID); - void updateFullscreenFadeOnWorkspace(CWorkspace*); + void updateFullscreenFadeOnWorkspace(PHLWORKSPACE); CWindow* getX11Parent(CWindow*); void scheduleFrameForMonitor(CMonitor*); void addToFadingOutSafe(SLayerSurface*); @@ -189,13 +189,13 @@ class CCompositor { void closeWindow(CWindow*); Vector2D parseWindowVectorArgsRelative(const std::string&, const Vector2D&); void forceReportSizesToWindowsOnWorkspace(const int&); - CWorkspace* createNewWorkspace(const int&, const int&, const std::string& name = ""); // will be deleted next frame if left empty and unfocused! + PHLWORKSPACE createNewWorkspace(const int&, const int&, const std::string& name = ""); // will be deleted next frame if left empty and unfocused! void renameWorkspace(const int&, const std::string& name = ""); void setActiveMonitor(CMonitor*); bool isWorkspaceSpecial(const int&); int getNewSpecialID(); void performUserChecks(); - void moveWindowToWorkspaceSafe(CWindow* pWindow, CWorkspace* pWorkspace); + void moveWindowToWorkspaceSafe(CWindow* pWindow, PHLWORKSPACE pWorkspace); CWindow* getForceFocus(); void notifyIdleActivity(); void setIdleActivityInhibit(bool inhibit); |
