mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2025-12-25 21:00:07 +01:00
eis: drop the vestiges of client restrictions
Leftover from 479bda259a (and possibly
others). This dates back to when a client could have restrictions
configured on the same fd. This is now all out-of-band (portals!) so the
compositor knows what the client is allowed to set up anyway.
No need for this (read-only) API here.
This commit is contained in:
parent
f56a9000c0
commit
408a3a9462
3 changed files with 0 additions and 51 deletions
|
|
@ -151,26 +151,6 @@ eis_client_is_sender(struct eis_client *client)
|
|||
return client->is_sender;
|
||||
}
|
||||
|
||||
_public_ bool
|
||||
eis_client_has_capability(struct eis_client *client,
|
||||
enum eis_device_capability cap)
|
||||
{
|
||||
switch (cap) {
|
||||
case EIS_DEVICE_CAP_POINTER:
|
||||
case EIS_DEVICE_CAP_POINTER_ABSOLUTE:
|
||||
case EIS_DEVICE_CAP_KEYBOARD:
|
||||
case EIS_DEVICE_CAP_TOUCH:
|
||||
case EIS_DEVICE_CAP_BUTTON:
|
||||
case EIS_DEVICE_CAP_SCROLL:
|
||||
return mask_all(client->restrictions.cap_allow_mask, cap);
|
||||
}
|
||||
|
||||
/* Quietly ignore other capabilities, we don't want to future-proof this */
|
||||
if (cap == 0)
|
||||
log_bug_client(eis_client_get_context(client), "Check for invalid capability 0");
|
||||
return false;
|
||||
}
|
||||
|
||||
int
|
||||
eis_client_send_message(struct eis_client *client, const struct brei_object *object,
|
||||
uint32_t opcode, const char *signature, size_t nargs, ...)
|
||||
|
|
@ -479,11 +459,6 @@ eis_client_new(struct eis *eis, int fd)
|
|||
|
||||
client->source = source_ref(s);
|
||||
client->state = EIS_CLIENT_STATE_NEW;
|
||||
client->restrictions.cap_allow_mask =
|
||||
EIS_DEVICE_CAP_KEYBOARD |
|
||||
EIS_DEVICE_CAP_POINTER |
|
||||
EIS_DEVICE_CAP_POINTER_ABSOLUTE |
|
||||
EIS_DEVICE_CAP_TOUCH;
|
||||
|
||||
eis_add_client(eis, eis_client_ref(client));
|
||||
|
||||
|
|
|
|||
|
|
@ -82,10 +82,6 @@ struct eis_client {
|
|||
|
||||
struct list seats;
|
||||
struct list seats_pending;
|
||||
|
||||
struct {
|
||||
uint32_t cap_allow_mask;
|
||||
} restrictions;
|
||||
};
|
||||
|
||||
OBJECT_DECLARE_GETTER(eis_client, client, struct eis_client *);
|
||||
|
|
|
|||
|
|
@ -76,28 +76,6 @@ MUNIT_TEST(eistest_name)
|
|||
return MUNIT_OK;
|
||||
}
|
||||
|
||||
MUNIT_TEST(eistest_capabilities)
|
||||
{
|
||||
_unref_(peck) *peck = peck_new();
|
||||
|
||||
peck_enable_eis_behavior(peck, PECK_EIS_BEHAVIOR_ACCEPT_CLIENT);
|
||||
|
||||
peck_dispatch_until_stable(peck);
|
||||
|
||||
with_server(peck) {
|
||||
struct eis_client *client = peck_eis_get_default_client(peck);
|
||||
|
||||
munit_assert_true(eis_client_has_capability(client, EIS_DEVICE_CAP_POINTER));
|
||||
munit_assert_true(eis_client_has_capability(client, EIS_DEVICE_CAP_TOUCH));
|
||||
munit_assert_true(eis_client_has_capability(client, EIS_DEVICE_CAP_KEYBOARD));
|
||||
munit_assert_true(eis_client_has_capability(client, EIS_DEVICE_CAP_POINTER_ABSOLUTE));
|
||||
munit_assert_false(eis_client_has_capability(client, 0));
|
||||
munit_assert_false(eis_client_has_capability(client, EIS_DEVICE_CAP_TOUCH + 1));
|
||||
}
|
||||
|
||||
return MUNIT_OK;
|
||||
}
|
||||
|
||||
MUNIT_TEST(eistest_cliend_bind_all_caps)
|
||||
{
|
||||
_unref_(peck) *peck = peck_new();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue