swaywm / swaylock

Screen locker for Wayland
MIT License
850 stars 200 forks source link

Updated: Fix output-specific images when output reappears #330

Closed alexbakker closed 11 months ago

alexbakker commented 11 months ago

Since #155 hasn't been touched in quite a while, I figured I'd take a shot at dragging it across the finish line. The patch has been rebased and modified to use wl_output instead of xdg_output. The remaining feedback from the previous pull request has also been addressed.

emersion commented 11 months ago

Hm, this looks a bit fragile. I would suggest moving this

https://github.com/swaywm/swaylock/blob/f2298bdbf788678a9e08fd17a3e37600767f5a9b/main.c#L314

to handle_wl_output_done instead.

emersion commented 11 months ago

Would need to add a check to make sure create_surface() only runs once per surface.

alexbakker commented 11 months ago

Alright. How's this?