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/ForeignToplevelWlr.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/ForeignToplevelWlr.hpp')
| -rw-r--r-- | src/protocols/ForeignToplevelWlr.hpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/protocols/ForeignToplevelWlr.hpp b/src/protocols/ForeignToplevelWlr.hpp index c22a71cd..e3b6f3f3 100644 --- a/src/protocols/ForeignToplevelWlr.hpp +++ b/src/protocols/ForeignToplevelWlr.hpp @@ -10,15 +10,15 @@ class CMonitor; class CForeignToplevelHandleWlr { public: - CForeignToplevelHandleWlr(SP<CZwlrForeignToplevelHandleV1> resource_, CWindow* pWindow); + CForeignToplevelHandleWlr(SP<CZwlrForeignToplevelHandleV1> resource_, PHLWINDOW pWindow); bool good(); - CWindow* window(); + PHLWINDOW window(); wl_resource* res(); private: SP<CZwlrForeignToplevelHandleV1> resource; - CWindow* pWindow = nullptr; + PHLWINDOWREF pWindow; bool closed = false; int64_t lastMonitorID = -1; @@ -32,22 +32,22 @@ class CForeignToplevelWlrManager { public: CForeignToplevelWlrManager(SP<CZwlrForeignToplevelManagerV1> resource_); - void onMap(CWindow* pWindow); - void onTitle(CWindow* pWindow); - void onClass(CWindow* pWindow); - void onMoveMonitor(CWindow* pWindow); - void onFullscreen(CWindow* pWindow); - void onNewFocus(CWindow* pWindow); - void onUnmap(CWindow* pWindow); + void onMap(PHLWINDOW pWindow); + void onTitle(PHLWINDOW pWindow); + void onClass(PHLWINDOW pWindow); + void onMoveMonitor(PHLWINDOW pWindow); + void onFullscreen(PHLWINDOW pWindow); + void onNewFocus(PHLWINDOW pWindow); + void onUnmap(PHLWINDOW pWindow); bool good(); private: SP<CZwlrForeignToplevelManagerV1> resource; - bool finished = false; - CWindow* lastFocus = nullptr; // READ-ONLY + bool finished = false; + PHLWINDOWREF lastFocus; // READ-ONLY - SP<CForeignToplevelHandleWlr> handleForWindow(CWindow* pWindow); + SP<CForeignToplevelHandleWlr> handleForWindow(PHLWINDOW pWindow); std::vector<WP<CForeignToplevelHandleWlr>> handles; }; @@ -58,7 +58,7 @@ class CForeignToplevelWlrProtocol : public IWaylandProtocol { virtual void bindManager(wl_client* client, void* data, uint32_t ver, uint32_t id); - CWindow* windowFromHandleResource(wl_resource* res); + PHLWINDOW windowFromHandleResource(wl_resource* res); private: void onManagerResourceDestroy(CForeignToplevelWlrManager* mgr); |
