diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-04-20 20:16:42 +0100 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-04-20 20:16:42 +0100 |
| commit | 4ad739ec63c9a11f0537a884ae2a4c56d6bab10b (patch) | |
| tree | 0842db7489691fc6e7cbb3cd6d3321dd0d4790b6 /src/protocols/Screencopy.hpp | |
| parent | 1055e6bee677ef9c4ab4d09e43155e00a98a3b49 (diff) | |
HookSystem: improve callback safety
Diffstat (limited to 'src/protocols/Screencopy.hpp')
| -rw-r--r-- | src/protocols/Screencopy.hpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/protocols/Screencopy.hpp b/src/protocols/Screencopy.hpp index 0c709c7b..8facc53e 100644 --- a/src/protocols/Screencopy.hpp +++ b/src/protocols/Screencopy.hpp @@ -20,21 +20,21 @@ class CScreencopyClient { CScreencopyClient(); ~CScreencopyClient(); - int ref = 0; - wl_resource* resource = nullptr; + int ref = 0; + wl_resource* resource = nullptr; - eClientOwners clientOwner = CLIENT_SCREENCOPY; + eClientOwners clientOwner = CLIENT_SCREENCOPY; - int frameCounter = 0; - int framesInLastHalfSecond = 0; - CTimer lastMeasure; - CTimer lastFrame; - bool sentScreencast = false; + int frameCounter = 0; + int framesInLastHalfSecond = 0; + CTimer lastMeasure; + CTimer lastFrame; + bool sentScreencast = false; - void onTick(); - HOOK_CALLBACK_FN* tickCallback = nullptr; + void onTick(); + std::shared_ptr<HOOK_CALLBACK_FN> tickCallback; - bool operator==(const CScreencopyClient& other) const { + bool operator==(const CScreencopyClient& other) const { return resource == other.resource; } }; |
