pointer-constraint: set lifetime correctly

ref #6679
This commit is contained in:
Vaxry 2024-06-29 00:18:18 +02:00
parent ac11771348
commit d16c6aa1db
2 changed files with 6 additions and 6 deletions

View file

@ -7,8 +7,8 @@
#define LOGM PROTO::constraints->protoLog #define LOGM PROTO::constraints->protoLog
CPointerConstraint::CPointerConstraint(SP<CZwpLockedPointerV1> resource_, SP<CWLSurfaceResource> surf, wl_resource* region_, zwpPointerConstraintsV1Lifetime lifetime) : CPointerConstraint::CPointerConstraint(SP<CZwpLockedPointerV1> resource_, SP<CWLSurfaceResource> surf, wl_resource* region_, zwpPointerConstraintsV1Lifetime lifetime_) :
resourceL(resource_), locked(true) { resourceL(resource_), locked(true), lifetime(lifetime_) {
if (!resource_->resource()) if (!resource_->resource())
return; return;
@ -46,8 +46,8 @@ CPointerConstraint::CPointerConstraint(SP<CZwpLockedPointerV1> resource_, SP<CWL
sharedConstructions(); sharedConstructions();
} }
CPointerConstraint::CPointerConstraint(SP<CZwpConfinedPointerV1> resource_, SP<CWLSurfaceResource> surf, wl_resource* region_, zwpPointerConstraintsV1Lifetime lifetime) : CPointerConstraint::CPointerConstraint(SP<CZwpConfinedPointerV1> resource_, SP<CWLSurfaceResource> surf, wl_resource* region_, zwpPointerConstraintsV1Lifetime lifetime_) :
resourceC(resource_), locked(false) { resourceC(resource_), locked(false), lifetime(lifetime_) {
if (!resource_->resource()) if (!resource_->resource())
return; return;

View file

@ -16,8 +16,8 @@ class CWLSurfaceResource;
class CPointerConstraint { class CPointerConstraint {
public: public:
CPointerConstraint(SP<CZwpLockedPointerV1> resource_, SP<CWLSurfaceResource> surf, wl_resource* region, zwpPointerConstraintsV1Lifetime lifetime); CPointerConstraint(SP<CZwpLockedPointerV1> resource_, SP<CWLSurfaceResource> surf, wl_resource* region, zwpPointerConstraintsV1Lifetime lifetime_);
CPointerConstraint(SP<CZwpConfinedPointerV1> resource_, SP<CWLSurfaceResource> surf, wl_resource* region, zwpPointerConstraintsV1Lifetime lifetime); CPointerConstraint(SP<CZwpConfinedPointerV1> resource_, SP<CWLSurfaceResource> surf, wl_resource* region, zwpPointerConstraintsV1Lifetime lifetime_);
~CPointerConstraint(); ~CPointerConstraint();
bool good(); bool good();