swaywm / swaylock

Screen locker for Wayland
MIT License
853 stars 201 forks source link

Avoid getting render-loop stuck #371

Closed kennylevinsen closed 2 months ago

kennylevinsen commented 2 months 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