You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
remarkable: fix button-listen when resuming from suspend (koreader#1145)
When the home button is used to wake the device from suspend the evdev
events have surprising time stamps. There is a pair of press & release
events, but the press has a timestamp from when the device went into
suspend and the release has a timestamp from after. This means that the
wake keypress will launch koreader as button-listen thinks the key was
held down for the whole time the device was suspended!
Instead, just record CLOCK_BOOTTIME timestamps for the events and use
those instead of the event timestamps. CLOCK_BOOTTIME is monotonic but
includes time spend in suspend.
Also keep track of whether button-listen saw a key press before each key
release. Probably not strictly required but seemed sensible to add.
0 commit comments