aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-10-07 18:18:48 +0200
committerSimon Zeni <simon@bl4ckb0ne.ca>2022-10-07 19:49:28 +0000
commit11d073ab099e4ee5a80c399385650d315d453e3e (patch)
tree2a0fd10328ac29e0efbcfd5aef7e0853e14d6791
parent5c382f6344718786842aaec0930010679cd61927 (diff)
drm-lease-v1: send finished event on failure in submit request
If the "submit" request handler fails, send a "finished" event so that the client doesn't stall forever.
-rw-r--r--types/wlr_drm_lease_v1.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/types/wlr_drm_lease_v1.c b/types/wlr_drm_lease_v1.c
index 05d2520b..b9eb373c 100644
--- a/types/wlr_drm_lease_v1.c
+++ b/types/wlr_drm_lease_v1.c
@@ -322,12 +322,14 @@ static void drm_lease_request_v1_handle_submit(
drm_lease_request_v1_from_resource(resource);
if (!request) {
wlr_log(WLR_DEBUG, "Request has been destroyed");
+ wp_drm_lease_v1_send_finished(lease_resource);
return;
}
/* Pre-emptively reject invalid lease requests */
if (request->invalid) {
wlr_log(WLR_ERROR, "Invalid request");
+ wp_drm_lease_v1_send_finished(lease_resource);
return;
} else if (request->n_connectors == 0) {
wl_resource_post_error(lease_resource,
@@ -341,6 +343,7 @@ static void drm_lease_request_v1_handle_submit(
if (conn->active_lease) {
wlr_log(WLR_ERROR, "Failed to create lease, connector %s has "
"already been leased", conn->output->name);
+ wp_drm_lease_v1_send_finished(lease_resource);
return;
}
}