diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2024-10-19 23:03:29 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-19 23:03:29 +0100 |
| commit | f044e4c9514ec89c4c1fc8a523ca90b8cb907fb7 (patch) | |
| tree | 5fa2ba17c08d522b7bb3f6564761b4aaedc532d0 /src/protocols/SessionLock.cpp | |
| parent | ce3ba798df6bca5be1da4396644a9ef08a2acab4 (diff) | |
internal: Move CMonitor to SP (#8178)
* move monitors to sp
* XD
Diffstat (limited to 'src/protocols/SessionLock.cpp')
| -rw-r--r-- | src/protocols/SessionLock.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/protocols/SessionLock.cpp b/src/protocols/SessionLock.cpp index b1f701bf..642a5b89 100644 --- a/src/protocols/SessionLock.cpp +++ b/src/protocols/SessionLock.cpp @@ -5,7 +5,7 @@ #include "core/Compositor.hpp" #include "core/Output.hpp" -CSessionLockSurface::CSessionLockSurface(SP<CExtSessionLockSurfaceV1> resource_, SP<CWLSurfaceResource> surface_, CMonitor* pMonitor_, WP<CSessionLock> owner_) : +CSessionLockSurface::CSessionLockSurface(SP<CExtSessionLockSurfaceV1> resource_, SP<CWLSurfaceResource> surface_, PHLMONITOR pMonitor_, WP<CSessionLock> owner_) : resource(resource_), sessionLock(owner_), pSurface(surface_), pMonitor(pMonitor_) { if (!resource->resource()) return; @@ -82,8 +82,8 @@ bool CSessionLockSurface::inert() { return sessionLock.expired(); } -CMonitor* CSessionLockSurface::monitor() { - return pMonitor; +PHLMONITOR CSessionLockSurface::monitor() { + return pMonitor.lock(); } SP<CWLSurfaceResource> CSessionLockSurface::surface() { @@ -184,7 +184,7 @@ void CSessionLockProtocol::onGetLockSurface(CExtSessionLockV1* lock, uint32_t id LOGM(LOG, "New sessionLockSurface with id {}", id); auto PSURFACE = CWLSurfaceResource::fromResource(surface); - auto PMONITOR = CWLOutputResource::fromResource(output)->monitor.get(); + auto PMONITOR = CWLOutputResource::fromResource(output)->monitor.lock(); SP<CSessionLock> sessionLock; for (auto const& l : m_vLocks) { |
