From e656697a7d6ad851cf299276287665f2aaf80369 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 3 Nov 2021 14:23:00 +0100 Subject: backend/drm: scan leases on uevent Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3181 --- backend/drm/backend.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'backend/drm/backend.c') diff --git a/backend/drm/backend.c b/backend/drm/backend.c index ca91be15..10f324a0 100644 --- a/backend/drm/backend.c +++ b/backend/drm/backend.c @@ -133,12 +133,15 @@ static void handle_dev_change(struct wl_listener *listener, void *data) { return; } - // TODO: add and handle lease uevents switch (change->type) { - case WLR_DEVICE_HOTPLUG:; + case WLR_DEVICE_HOTPLUG: wlr_log(WLR_DEBUG, "Received hotplug event for %s", drm->name); scan_drm_connectors(drm, &change->hotplug); break; + case WLR_DEVICE_LEASE: + wlr_log(WLR_DEBUG, "Received lease event for %s", drm->name); + scan_drm_leases(drm); + break; default: wlr_log(WLR_DEBUG, "Received unknown change event for %s", drm->name); } -- cgit v1.2.3