diff options
| author | Ikalco <73481042+ikalco@users.noreply.github.com> | 2024-07-24 12:07:36 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-24 19:07:36 +0200 |
| commit | 3e543d2ce8ba64abb4d226dbb88c4513474501cf (patch) | |
| tree | d340935c65520e293a73623c148219993e38779b /src/protocols/Screencopy.hpp | |
| parent | 735e3c6c56d22059ee6340c0327e4b5a9154f013 (diff) | |
core: Properly shutdown wl display (#7018)
* correctly destroy wayland globals
* properly shutdown and cleanup hyprland
* appease the nitpick gods and some comments
Diffstat (limited to 'src/protocols/Screencopy.hpp')
| -rw-r--r-- | src/protocols/Screencopy.hpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/protocols/Screencopy.hpp b/src/protocols/Screencopy.hpp index 4999773b..d564e432 100644 --- a/src/protocols/Screencopy.hpp +++ b/src/protocols/Screencopy.hpp @@ -70,17 +70,20 @@ struct SScreencopyFrame { class CScreencopyProtocolManager { public: CScreencopyProtocolManager(); + ~CScreencopyProtocolManager(); - void bindManager(wl_client* client, void* data, uint32_t version, uint32_t id); - void removeClient(CScreencopyClient* client, bool force = false); - void removeFrame(SScreencopyFrame* frame, bool force = false); - void displayDestroy(); + void bindManager(wl_client* client, void* data, uint32_t version, uint32_t id); + void removeClient(CScreencopyClient* client, bool force = false); + void removeFrame(SScreencopyFrame* frame, bool force = false); + void displayDestroy(); - void captureOutput(wl_client* client, wl_resource* resource, uint32_t frame, int32_t overlay_cursor, wl_resource* output, CBox box = {0, 0, 0, 0}); + void captureOutput(wl_client* client, wl_resource* resource, uint32_t frame, int32_t overlay_cursor, wl_resource* output, CBox box = {0, 0, 0, 0}); - void copyFrame(wl_client* client, wl_resource* resource, wl_resource* buffer); + void copyFrame(wl_client* client, wl_resource* resource, wl_resource* buffer); - void onOutputCommit(CMonitor* pMonitor); + void onOutputCommit(CMonitor* pMonitor); + + wl_listener m_liDisplayDestroy; private: wl_global* m_pGlobal = nullptr; @@ -90,8 +93,6 @@ class CScreencopyProtocolManager { SP<CEventLoopTimer> m_pSoftwareCursorTimer; bool m_bTimerArmed = false; - wl_listener m_liDisplayDestroy; - std::vector<SScreencopyFrame*> m_vFramesAwaitingWrite; SP<Aquamarine::IBuffer> m_pLastMonitorBackBuffer; @@ -103,4 +104,4 @@ class CScreencopyProtocolManager { bool copyFrameShm(SScreencopyFrame* frame, timespec* now); friend class CScreencopyClient; -};
\ No newline at end of file +}; |
