summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2017-05-22 14:28:31 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2017-05-23 15:09:40 +1000
commit782a0661d110bf1cb348a4acf5858e385f0dc0f2 (patch)
tree9425a1b2fee69e6865d6f8ed029d7772b3df6ae1
parenta2a8db261aa65dae1d657a37533b4a99d711b668 (diff)
lid: add a comment for why we post the switch state there
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/evdev-lid.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/evdev-lid.c b/src/evdev-lid.c
index 9e694ba..9815b8f 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,