internal: Move CMonitor to SP (#8178)

* move monitors to sp

* XD
This commit is contained in:
Vaxry
2024-10-19 23:03:29 +01:00
committed by GitHub
parent ce3ba798df
commit f044e4c951
66 changed files with 424 additions and 446 deletions

View File

@@ -14,8 +14,8 @@ void CLayerShellResource::SState::reset() {
margin = {0, 0, 0, 0};
}
CLayerShellResource::CLayerShellResource(SP<CZwlrLayerSurfaceV1> resource_, SP<CWLSurfaceResource> surf_, std::string namespace_, CMonitor* pMonitor, zwlrLayerShellV1Layer layer) :
layerNamespace(namespace_), surface(surf_), resource(resource_) {
CLayerShellResource::CLayerShellResource(SP<CZwlrLayerSurfaceV1> resource_, SP<CWLSurfaceResource> surf_, std::string namespace_, PHLMONITOR pMonitor,
zwlrLayerShellV1Layer layer) : layerNamespace(namespace_), surface(surf_), resource(resource_) {
if (!good())
return;
@@ -218,7 +218,7 @@ void CLayerShellProtocol::destroyResource(CLayerShellResource* surf) {
void CLayerShellProtocol::onGetLayerSurface(CZwlrLayerShellV1* pMgr, uint32_t id, wl_resource* surface, wl_resource* output, zwlrLayerShellV1Layer layer, std::string namespace_) {
const auto CLIENT = pMgr->client();
const auto PMONITOR = output ? CWLOutputResource::fromResource(output)->monitor.get() : nullptr;
const auto PMONITOR = output ? CWLOutputResource::fromResource(output)->monitor.lock() : nullptr;
auto SURF = CWLSurfaceResource::fromResource(surface);
if (!SURF) {