[PATCH libinput 1/5] lid: add a comment for why we post the switch state there

Peter Hutterer peter.hutterer at who-t.net
Wed May 24 00:04:00 UTC 2017


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/evdev-lid.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/evdev-lid.c b/src/evdev-lid.c
index 9e694ba1..9815b8fa 100644
--- a/src/evdev-lid.c
+++ b/src/evdev-lid.c
@@ -74,6 +74,10 @@ lid_switch_keyboard_event(uint64_t time,
 		 * regardless. */
 	}
 
+	/* Posting the event here means we preempt the keyboard events that
+	 * caused us to wake up, so the lid event is always passed on before
+	 * the key event.
+	 */
 	dispatch->lid_is_closed = false;
 	switch_notify_toggle(&dispatch->device->base,
 			     time,
-- 
2.13.0



More information about the wayland-devel mailing list