diff options
author | Simon Ser <contact@emersion.fr> | 2021-11-03 13:37:24 +0100 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2021-11-19 16:06:07 +0000 |
commit | a37f538ca0cc6d504358eb797150751b60c4511b (patch) | |
tree | 27bc06727c03027b924455f8c01caae9aac20440 | |
parent | d0bb7df6303cbe919f5d6d456cd4a8d46904b115 (diff) |
Introduce WLR_DEVICE_LEASE events
This will allow the DRM backend to reload its lessee list.
-rw-r--r-- | backend/session/session.c | 8 | ||||
-rw-r--r-- | include/wlr/backend/session.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/backend/session/session.c b/backend/session/session.c index 382f3d60..e83a8b4c 100644 --- a/backend/session/session.c +++ b/backend/session/session.c @@ -157,6 +157,14 @@ static void read_udev_change_event(struct wlr_device_change_event *event, if (prop != NULL) { hotplug->prop_id = strtoul(prop, NULL, 10); } + + return; + } + + const char *lease = udev_device_get_property_value(udev_dev, "LEASE"); + if (lease != NULL && strcmp(lease, "1") == 0) { + event->type = WLR_DEVICE_LEASE; + return; } } diff --git a/include/wlr/backend/session.h b/include/wlr/backend/session.h index 7d34bfeb..c8461ff7 100644 --- a/include/wlr/backend/session.h +++ b/include/wlr/backend/session.h @@ -59,6 +59,7 @@ struct wlr_session_add_event { enum wlr_device_change_type { WLR_DEVICE_HOTPLUG = 1, + WLR_DEVICE_LEASE, }; struct wlr_device_hotplug_event { |