From 869af1cfbb3944d32d59a4c08ca439e7b5eaf6d2 Mon Sep 17 00:00:00 2001
From: Isaac Freund <mail@isaacfreund.com>
Date: Wed, 21 Dec 2022 17:52:48 +0100
Subject: session-lock: send more protocol errors

The invalid_destroy and invalid_unlock protocol errors aren't currently
sent by wlroots and instead left up to the compositor. However, we can
handle these as well without much additional complexity.

This also adds a missing wl_resource_destroy() call if the lock is inert
in lock_handle_unlock_and_destroy().
---
 include/wlr/types/wlr_session_lock_v1.h | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'include/wlr')

diff --git a/include/wlr/types/wlr_session_lock_v1.h b/include/wlr/types/wlr_session_lock_v1.h
index 6ad18df7..b6eee1a3 100644
--- a/include/wlr/types/wlr_session_lock_v1.h
+++ b/include/wlr/types/wlr_session_lock_v1.h
@@ -40,6 +40,10 @@ struct wlr_session_lock_v1 {
 	} events;
 
 	void *data;
+
+	// private state
+
+	bool locked_sent;
 };
 
 struct wlr_session_lock_surface_v1_state {
-- 
cgit v1.2.3