Ignore button events in the first 10 seconds after resume. On some ACPI
authorkettenis <kettenis@openbsd.org>
Mon, 13 May 2024 19:56:37 +0000 (19:56 +0000)
committerkettenis <kettenis@openbsd.org>
Mon, 13 May 2024 19:56:37 +0000 (19:56 +0000)
commit8a0aee6c29f5baec086d022bd084cdf14fdf6155
tree121ce42aa54e49f11fb2225c46c7047133d7728a
parent28f73f25b5125f4bb05a96ce90cd4e3c2a91bb2f
Ignore button events in the first 10 seconds after resume.  On some ACPI
implementations pressing the power button to wake up a machine will cause
a power button notification to happen for that button press   This would
initiate a power down, which isn't the user's intent.

Based on earlier diffs from deraadt@ and James Cook.

ok mlarkin@, "I'm not opposed" cheloha@
sys/dev/acpi/acpi.c
sys/dev/acpi/acpi_x86.c
sys/dev/acpi/acpibtn.c
sys/dev/acpi/acpivar.h