diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2024-04-27 12:43:12 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-27 12:43:12 +0100 |
| commit | bca7804bb6e1bf5ce5a99b9ae4806be25e36993c (patch) | |
| tree | ebd3a578de1dfe11b54f9440cfc3a408ffa6a620 /src/protocols/ForeignToplevel.hpp | |
| parent | 25aec3ac8ce65ed224f025f8f6dfef73780577a4 (diff) | |
internal: Window storage rework - part 1 (#5762)
* Window storage rework - part 1
* format
* remove useless include
* fix pch
* format
* fix crash in dwindle
* fix vram leak
* prefer .expired() for bool checks
Diffstat (limited to 'src/protocols/ForeignToplevel.hpp')
| -rw-r--r-- | src/protocols/ForeignToplevel.hpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/protocols/ForeignToplevel.hpp b/src/protocols/ForeignToplevel.hpp index 37506ad7..d95db41f 100644 --- a/src/protocols/ForeignToplevel.hpp +++ b/src/protocols/ForeignToplevel.hpp @@ -6,19 +6,17 @@ #include "WaylandProtocol.hpp" #include "ext-foreign-toplevel-list-v1.hpp" -class CWindow; - class CForeignToplevelHandle { public: - CForeignToplevelHandle(SP<CExtForeignToplevelHandleV1> resource_, CWindow* pWindow); + CForeignToplevelHandle(SP<CExtForeignToplevelHandleV1> resource_, PHLWINDOW pWindow); - bool good(); - CWindow* window(); + bool good(); + PHLWINDOW window(); private: SP<CExtForeignToplevelHandleV1> resource; - CWindow* pWindow = nullptr; - bool closed = false; + PHLWINDOWREF pWindow; + bool closed = false; friend class CForeignToplevelList; }; @@ -27,10 +25,10 @@ class CForeignToplevelList { public: CForeignToplevelList(SP<CExtForeignToplevelListV1> resource_); - void onMap(CWindow* pWindow); - void onTitle(CWindow* pWindow); - void onClass(CWindow* pWindow); - void onUnmap(CWindow* pWindow); + void onMap(PHLWINDOW pWindow); + void onTitle(PHLWINDOW pWindow); + void onClass(PHLWINDOW pWindow); + void onUnmap(PHLWINDOW pWindow); bool good(); @@ -38,7 +36,7 @@ class CForeignToplevelList { SP<CExtForeignToplevelListV1> resource; bool finished = false; - SP<CForeignToplevelHandle> handleForWindow(CWindow* pWindow); + SP<CForeignToplevelHandle> handleForWindow(PHLWINDOW pWindow); std::vector<WP<CForeignToplevelHandle>> handles; }; |
