Fix the poweroff on power slider feature

Previously, under certain conditions it was impossible to power
off the device by maintaining the slider for 3 seconds; the
poweroff was always reported as canceled even if the user never
pressed any other button or released the slider for 3 seconds.