diff options
| author | Tom Englund <tomenglund26@gmail.com> | 2024-06-06 20:27:09 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-06 20:27:09 +0200 |
| commit | af5f24929d83cc7a97a77de516bc665e38acfa12 (patch) | |
| tree | f2afec3d02f3595efdadb4e40fa4724244953c40 /src/managers/PointerManager.hpp | |
| parent | c95845b1488b4bd63e901cbdc4cb68c27a45971b (diff) | |
core: free more memory on destruction (#6348)
* pointermgr: add destructor to state and free buf
if the pointer has a buffer set it wont be freed upon destruction, make
asan more happy by adding a destructor and wlr_buf_unlock it on exit.
* cursormgr: free the animation timer event source
properly free the animation timer event source on destruction.
* compositor: free the critsig event source on exit
properly free the critical signal event source on exit.
* popup: clang format style
clang format.
Diffstat (limited to 'src/managers/PointerManager.hpp')
| -rw-r--r-- | src/managers/PointerManager.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/managers/PointerManager.hpp b/src/managers/PointerManager.hpp index b6cb0c7a..db9f27e7 100644 --- a/src/managers/PointerManager.hpp +++ b/src/managers/PointerManager.hpp @@ -146,6 +146,11 @@ class CPointerManager { struct SMonitorPointerState { SMonitorPointerState(SP<CMonitor> m) : monitor(m) {} + ~SMonitorPointerState() { + if (cursorFrontBuffer) + wlr_buffer_unlock(cursorFrontBuffer); + } + WP<CMonitor> monitor; int softwareLocks = 0; |
