swaywm / swaylock

Screen locker for Wayland
MIT License
832 stars 197 forks source link

Avoid getting render-loop stuck #371

Closed kennylevinsen closed 3 weeks ago

kennylevinsen commented 3 weeks ago

One could quite consistently get the render loop stuck by waking the system with a keypress, such that swaylock would receive a configure event shortly before rendering a new frame.

Reproduction script:

swayidle \
        timeout 3 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
        &

swaylock -e -F
kill %swayidle
swaymsg "output * power on"

Run that, then wake the machine with backspace. swaylock renders the "Cleared" text, and nothing more. It can be a bit timing sensitive.

Fixes: https://github.com/swaywm/swaylock/issues/370