Small delay before swaylock grabs the keyboard input when resuming.
plattfot opened this issue · 3 comments
There seems to be a small delay between when swayidle
resumes and when it passes the input to swaylock
. Learned this the hard way when I tried to unlock my computer. Instead of typing in my password in swaylock
I typed it in a chat window and sent it.
Using sway-1.5
, swayidle-1.6
and swaylock-1.5
Arch running 5.8.8-arch1
with mesa-20.1.7
. Using a RX 5700xt with two 4k monitors hooked up (ASUS VG289Q). My monitors are pretty slow to wake up so maybe that has something to do with it.
Repro:
In the sway
config:
exec swayidle -w \
timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
timeout 300 'swaylock -f -c 000000' \
before-sleep 'swaylock -f -c 000000'
Have a text editor open, wait until swayidle
's timeout threshold is hit and monitors have gone to sleep. Then start typing and some text should end up in the text editor before swaylock is started.
swayidle should lock the screen even before it goes to sleep. depending how you enter sleep, check the git version of swayidle that additionally can inhibit sleep for a short while so it can actually lock the screen
I'm calling swayidle
as in the repro step. And swaylock
is active once my monitors turns on so it is definitely locked before it goes to sleep. Seems to be a bit random though as I haven't been able to reproduce it after the chat incident.
I'll try the latest in git and see if that helps.
I'm closing this issue. It's been hard to reproduce and it looks like it might be swaylock as I had one incident that swaylock wasn't active once my monitors woke up. Luckily I've change my password to take longer to type than it takes to my monitors to wake up 👍