<feed xmlns='http://www.w3.org/2005/Atom'>
<title>swaylock/.git/main.c, branch v1.8.1</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/'/>
<entry>
<title>Define _POSIX_C_SOURCE globally</title>
<updated>2025-03-18T21:31:01+00:00</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2025-03-18T21:23:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=0b10244dc09c7108e7046700a4cd0a64dde57380'/>
<id>0b10244dc09c7108e7046700a4cd0a64dde57380</id>
<content type='text'>
Other Sway projects have switched to this approach.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Other Sway projects have switched to this approach.
</pre>
</div>
</content>
</entry>
<entry>
<title>Better handle subprocess crashes</title>
<updated>2025-03-12T10:17:13+00:00</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2025-03-12T00:31:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=34e0aabc51074a2476d27148c4f755d558da3ec9'/>
<id>34e0aabc51074a2476d27148c4f755d558da3ec9</id>
<content type='text'>
On my machine EOF doesn't trigger POLLHUP (not sure why), instead
read() returns zero. It just prints the following message in a
loop:

    [comm.c:101] Failed to read pw result: Success

Better handle this case in read_comm_reply() by making a difference
between a failed read() and a failed authentication.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On my machine EOF doesn't trigger POLLHUP (not sure why), instead
read() returns zero. It just prints the following message in a
loop:

    [comm.c:101] Failed to read pw result: Success

Better handle this case in read_comm_reply() by making a difference
between a failed read() and a failed authentication.
</pre>
</div>
</content>
</entry>
<entry>
<title>Exit when password handling subprocess crashes</title>
<updated>2024-11-01T21:55:34+00:00</updated>
<author>
<name>Manuel Stoeckl</name>
<email>code@mstoeckl.com</email>
</author>
<published>2024-11-01T19:46:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=96f0a0f9c6a9412fc1886bf54e37ece75b0e9f99'/>
<id>96f0a0f9c6a9412fc1886bf54e37ece75b0e9f99</id>
<content type='text'>
It is better to have swaylock crash immediately and the compositor
show a red screen than to operate in a degraded state where
passwords cannot be checked and the screen cannot be unlocked.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is better to have swaylock crash immediately and the compositor
show a red screen than to operate in a degraded state where
passwords cannot be checked and the screen cannot be unlocked.
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve frame callback and commit handling</title>
<updated>2024-09-06T23:46:24+00:00</updated>
<author>
<name>Kenny Levinsen</name>
<email>kl@kl.wtf</email>
</author>
<published>2024-09-06T22:27:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=cca2436ba535d17c49b7d7ba75ebfa6a18ec9209'/>
<id>cca2436ba535d17c49b7d7ba75ebfa6a18ec9209</id>
<content type='text'>
The few places that required a surface commit relied on render_frame and
render_frame_background to form it form them after they had set up frame
callback events. This would fail if render_frame ran out of buffers and
exited early, as the caller would still wait indefinitely on the frame
callback.

swaylock would quite consistently run out of buffers when rendering
immediately after a configure event, such as when the keypress causing
render also caused outputs to be enabled from idle.

Restructure the render and commit handling slightly so that the whole
frame callback and commit setup is handled by the render code, which now
has a single render entrypoint. This both avoids stalls from lacking
commits, but also fixes the case the configure path to respect frame
callbacks so we do not run out of buffers in the first place.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The few places that required a surface commit relied on render_frame and
render_frame_background to form it form them after they had set up frame
callback events. This would fail if render_frame ran out of buffers and
exited early, as the caller would still wait indefinitely on the frame
callback.

swaylock would quite consistently run out of buffers when rendering
immediately after a configure event, such as when the keypress causing
render also caused outputs to be enabled from idle.

Restructure the render and commit handling slightly so that the whole
frame callback and commit setup is handled by the render code, which now
has a single render entrypoint. This both avoids stalls from lacking
commits, but also fixes the case the configure path to respect frame
callbacks so we do not run out of buffers in the first place.
</pre>
</div>
</content>
</entry>
<entry>
<title>Init eventloop directly after wl_connect</title>
<updated>2024-02-23T18:17:28+00:00</updated>
<author>
<name>Christian Meissl</name>
<email>meissl.christian@gmail.com</email>
</author>
<published>2024-02-16T20:26:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=376cc5fcd486a3065b4c04ee4a1573606fb09038'/>
<id>376cc5fcd486a3065b4c04ee4a1573606fb09038</id>
<content type='text'>
this makes sure the eventloop is initialized before
any event dispatching. fixes occasional segfaults I
observed on resume.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this makes sure the eventloop is initialized before
any event dispatching. fixes occasional segfaults I
observed on resume.
</pre>
</div>
</content>
</entry>
<entry>
<title>Check initial wl_display_roundtrip() return value</title>
<updated>2023-12-14T10:52:28+00:00</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2023-12-14T10:35:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=7b4a5c44476615c1b0169e3c3b5e18810daba97e'/>
<id>7b4a5c44476615c1b0169e3c3b5e18810daba97e</id>
<content type='text'>
On error, print a message and exit.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On error, print a message and exit.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove unnecessary wl_display_roundtrip() call</title>
<updated>2023-12-14T10:52:28+00:00</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2023-12-14T10:32:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=9b4b3905885777b7e419b99e2a21f1cd1629c167'/>
<id>9b4b3905885777b7e419b99e2a21f1cd1629c167</id>
<content type='text'>
Calling wl_display_roundtrip() from an event handler is a bad
practice in general because it nests multiple dispatches.

We don't need to block here anyways.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Calling wl_display_roundtrip() from an event handler is a bad
practice in general because it nests multiple dispatches.

We don't need to block here anyways.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix output-specific images when output reappears</title>
<updated>2023-12-14T10:31:13+00:00</updated>
<author>
<name>Martin Dørum</name>
<email>martid0311@gmail.com</email>
</author>
<published>2020-10-15T12:26:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=ba921312c538e2857ef1bc9e8a6f3bbb5799cff6'/>
<id>ba921312c538e2857ef1bc9e8a6f3bbb5799cff6</id>
<content type='text'>
When setting an image with `--image &lt;output&gt;:&lt;path&gt;`, the image used to
fail to apply if the relevant output appears some time after swaylock
executes.

Co-authored-by: Alexander Bakker &lt;ab@alexbakker.me&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When setting an image with `--image &lt;output&gt;:&lt;path&gt;`, the image used to
fail to apply if the relevant output appears some time after swaylock
executes.

Co-authored-by: Alexander Bakker &lt;ab@alexbakker.me&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Make self-pipe nonblocking to prevent deadlock</title>
<updated>2023-10-07T20:15:02+00:00</updated>
<author>
<name>Manuel Stoeckl</name>
<email>code@mstoeckl.com</email>
</author>
<published>2023-10-06T10:18:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=ccd31553f335f5a67d01e4ddf00b5ed73415e4ca'/>
<id>ccd31553f335f5a67d01e4ddf00b5ed73415e4ca</id>
<content type='text'>
If a large number of signals is sent, it is possible to fill the
buffer for sigusr_fds[1] before the main loop has a chance to read
from it; then the signal handler do_sigusr() will block on write.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a large number of signals is sent, it is possible to fill the
buffer for sigusr_fds[1] before the main loop has a chance to read
from it; then the signal handler do_sigusr() will block on write.
</pre>
</div>
</content>
</entry>
<entry>
<title>Configure SIGUSR1 with sigaction() instead of signal()</title>
<updated>2023-10-07T20:15:02+00:00</updated>
<author>
<name>Manuel Stoeckl</name>
<email>code@mstoeckl.com</email>
</author>
<published>2023-10-07T17:01:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=0569a47ef78346c1f79506ac1c0d0782febe42cf'/>
<id>0569a47ef78346c1f79506ac1c0d0782febe42cf</id>
<content type='text'>
If signal() is used to set a signal handler, only the first signal
received will use the handler; any later signals use the default
behavior (making swaylock terminate immediately, without unlocking).
Using sigaction() ensures that the handler will be used every time.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If signal() is used to set a signal handler, only the first signal
received will use the handler; any later signals use the default
behavior (making swaylock terminate immediately, without unlocking).
Using sigaction() ensures that the handler will be used every time.
</pre>
</div>
</content>
</entry>
</feed>
