mirror of https://github.com/hyprwm/Hyprland
Compare commits
5 Commits
153c6c72f0
...
00db20b59f
Author | SHA1 | Date |
---|---|---|
|
00db20b59f | |
|
9c5dd59d4b | |
|
d16c6aa1db | |
|
0b1396558f | |
|
f7cc1c539d |
|
@ -1473,14 +1473,7 @@ void CInputManager::updateCapabilities() {
|
|||
if (h.expired())
|
||||
continue;
|
||||
|
||||
auto cap = h->getCapabilities();
|
||||
|
||||
if (cap & HID_INPUT_CAPABILITY_KEYBOARD)
|
||||
caps |= WL_SEAT_CAPABILITY_KEYBOARD;
|
||||
if (cap & HID_INPUT_CAPABILITY_POINTER)
|
||||
caps |= WL_SEAT_CAPABILITY_POINTER;
|
||||
if (cap & HID_INPUT_CAPABILITY_TOUCH)
|
||||
caps |= WL_SEAT_CAPABILITY_TOUCH;
|
||||
caps |= h->getCapabilities();
|
||||
}
|
||||
|
||||
g_pSeatManager->updateCapabilities(caps);
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
#define LOGM PROTO::constraints->protoLog
|
||||
|
||||
CPointerConstraint::CPointerConstraint(SP<CZwpLockedPointerV1> resource_, SP<CWLSurfaceResource> surf, wl_resource* region_, zwpPointerConstraintsV1Lifetime lifetime) :
|
||||
resourceL(resource_), locked(true) {
|
||||
CPointerConstraint::CPointerConstraint(SP<CZwpLockedPointerV1> resource_, SP<CWLSurfaceResource> surf, wl_resource* region_, zwpPointerConstraintsV1Lifetime lifetime_) :
|
||||
resourceL(resource_), locked(true), lifetime(lifetime_) {
|
||||
if (!resource_->resource())
|
||||
return;
|
||||
|
||||
|
@ -46,8 +46,8 @@ CPointerConstraint::CPointerConstraint(SP<CZwpLockedPointerV1> resource_, SP<CWL
|
|||
sharedConstructions();
|
||||
}
|
||||
|
||||
CPointerConstraint::CPointerConstraint(SP<CZwpConfinedPointerV1> resource_, SP<CWLSurfaceResource> surf, wl_resource* region_, zwpPointerConstraintsV1Lifetime lifetime) :
|
||||
resourceC(resource_), locked(false) {
|
||||
CPointerConstraint::CPointerConstraint(SP<CZwpConfinedPointerV1> resource_, SP<CWLSurfaceResource> surf, wl_resource* region_, zwpPointerConstraintsV1Lifetime lifetime_) :
|
||||
resourceC(resource_), locked(false), lifetime(lifetime_) {
|
||||
if (!resource_->resource())
|
||||
return;
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@ class CWLSurfaceResource;
|
|||
|
||||
class CPointerConstraint {
|
||||
public:
|
||||
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<CZwpLockedPointerV1> resource_, SP<CWLSurfaceResource> surf, wl_resource* region, zwpPointerConstraintsV1Lifetime lifetime_);
|
||||
CPointerConstraint(SP<CZwpConfinedPointerV1> resource_, SP<CWLSurfaceResource> surf, wl_resource* region, zwpPointerConstraintsV1Lifetime lifetime_);
|
||||
~CPointerConstraint();
|
||||
|
||||
bool good();
|
||||
|
@ -46,7 +46,7 @@ class CPointerConstraint {
|
|||
bool active = false;
|
||||
bool locked = false;
|
||||
bool dead = false;
|
||||
zwpPointerConstraintsV1Lifetime lifetime = ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ONESHOT;
|
||||
zwpPointerConstraintsV1Lifetime lifetime = ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_PERSISTENT;
|
||||
|
||||
void sharedConstructions();
|
||||
void onSetRegion(wl_resource* region);
|
||||
|
@ -78,4 +78,4 @@ class CPointerConstraintsProtocol : public IWaylandProtocol {
|
|||
|
||||
namespace PROTO {
|
||||
inline UP<CPointerConstraintsProtocol> constraints;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue