lid: track the notifier initial state internally, but not externally
authorBenjamin Tissoires <benjamin.tissoires@gmail.com>
Fri, 19 May 2017 10:55:54 +0000 (12:55 +0200)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 23 May 2017 05:10:10 +0000 (15:10 +1000)
commit28fcd2c6d41e972f606c60f56c6f0a94d73455ae
tree4536835f51a06d9613b2e51af54e8214de12eb68
parent1671c7f4adcf0873c55b21dc3e0578e91c360837
lid: track the notifier initial state internally, but not externally

What we do not want is libinput to believe the LID is closed while
it's not. But the internal notifier state need to be in sync with the evdev
node, or it's going to be a pain setting the keyboard listener.

But since we don't know if the state is reliable, we track the internal state
separately from the external state so that we can set up the keyboard listener
when the lid is closed, without having libinput actually send lid closed
events for unreliable devices.

https://bugs.freedesktop.org/show_bug.cgi?id=101099

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/evdev-lid.c