<feed xmlns='http://www.w3.org/2005/Atom'>
<title>swaylock/.git/include/swaylock.h, 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>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>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>Separate input and auth state</title>
<updated>2023-05-09T10:40:41+00:00</updated>
<author>
<name>Manuel Stoeckl</name>
<email>code@mstoeckl.com</email>
</author>
<published>2023-05-03T01:00:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=31ebd85fe09701146b7275de1ec8c8e9ce3c15c6'/>
<id>31ebd85fe09701146b7275de1ec8c8e9ce3c15c6</id>
<content type='text'>
This commit establishes separate state machines for auth state (whether
the password submitted is being verified or is wrong) and input state
(typing indicators and clear message -- things relevant to the state of
the password being typed in, before it is submitted.) This makes it
possible to display the auth state while updating the input state (for
example, show that the previously submitted password is 'verifying' or
'wrong' while typing another.)

The two state machines interact only when submitting a password. There
is some interference with the rendering code -- a 'cleared' message
from the input state machine supersedes verifying/wrong messages from
the auth state machine; although since the 'clear' state has a shorter
timeout than the auth 'invalid' state, this is unlikely to hide the 'wrong'
message.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit establishes separate state machines for auth state (whether
the password submitted is being verified or is wrong) and input state
(typing indicators and clear message -- things relevant to the state of
the password being typed in, before it is submitted.) This makes it
possible to display the auth state while updating the input state (for
example, show that the previously submitted password is 'verifying' or
'wrong' while typing another.)

The two state machines interact only when submitting a password. There
is some interference with the rendering code -- a 'cleared' message
from the input state machine supersedes verifying/wrong messages from
the auth state machine; although since the 'clear' state has a shorter
timeout than the auth 'invalid' state, this is unlikely to hide the 'wrong'
message.
</pre>
</div>
</content>
</entry>
<entry>
<title>Synchronize highlight position between outputs</title>
<updated>2023-04-02T00:34:19+00:00</updated>
<author>
<name>Manuel Stoeckl</name>
<email>code@mstoeckl.com</email>
</author>
<published>2023-03-28T23:42:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=75e837c31abe2fa06167b6f1f1a253ab397faf81'/>
<id>75e837c31abe2fa06167b6f1f1a253ab397faf81</id>
<content type='text'>
This change has the additional benefit of ensuring that the position
of the highlight only changes in reaction to a letter key or
backspace being pressed, and not when the compositor sends a new
configure event or the output needs to be redrawn for some other
reason.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change has the additional benefit of ensuring that the position
of the highlight only changes in reaction to a letter key or
backspace being pressed, and not when the compositor sends a new
configure event or the output needs to be redrawn for some other
reason.
</pre>
</div>
</content>
</entry>
<entry>
<title>Stop pooling background surface buffers</title>
<updated>2023-03-22T09:56:42+00:00</updated>
<author>
<name>Manuel Stoeckl</name>
<email>code@mstoeckl.com</email>
</author>
<published>2023-03-12T20:48:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=1d3e62c67f07a180fca02a6df1cf9648f2b50349'/>
<id>1d3e62c67f07a180fca02a6df1cf9648f2b50349</id>
<content type='text'>
The wl_buffers for the background surface only need to be updated
when the output dimensions change. Using the fixed pool of two
buffers to cache these buffers does not help, since if a new buffer
is needed, it will have a different size than whatever buffers were
cached. Furthermore, because the pool has fixed size, it is possible
to run out of buffers if configure events arrive faster than
pool buffers are marked not busy, which can lead to protocol errors
when the background surface is committed after acknowledging a new
size, but without attaching a buffer that matches that size.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The wl_buffers for the background surface only need to be updated
when the output dimensions change. Using the fixed pool of two
buffers to cache these buffers does not help, since if a new buffer
is needed, it will have a different size than whatever buffers were
cached. Furthermore, because the pool has fixed size, it is possible
to run out of buffers if configure events arrive faster than
pool buffers are marked not busy, which can lead to protocol errors
when the background surface is committed after acknowledging a new
size, but without attaching a buffer that matches that size.
</pre>
</div>
</content>
</entry>
<entry>
<title>Drop support for layer-shell</title>
<updated>2023-01-28T22:03:30+00:00</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2022-11-27T13:18:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=ac3b49b6571ceda3f8db11a98bfe320106996280'/>
<id>ac3b49b6571ceda3f8db11a98bfe320106996280</id>
<content type='text'>
Superseded by ext-session-lock-v1
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Superseded by ext-session-lock-v1
</pre>
</div>
</content>
</entry>
<entry>
<title>Add --ready-fd</title>
<updated>2023-01-28T21:58:19+00:00</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2023-01-27T12:29:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=db9ee6d1277b119d213f58bfce6052458cdfecd1'/>
<id>db9ee6d1277b119d213f58bfce6052458cdfecd1</id>
<content type='text'>
This implements a readiness notification mechanism which works on
both systemd and s6.

References: https://github.com/swaywm/swaylock/pull/42
References: https://github.com/swaywm/swaylock/pull/275
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This implements a readiness notification mechanism which works on
both systemd and s6.

References: https://github.com/swaywm/swaylock/pull/42
References: https://github.com/swaywm/swaylock/pull/275
</pre>
</div>
</content>
</entry>
<entry>
<title>Wait for the locked event</title>
<updated>2023-01-28T21:51:38+00:00</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2023-01-27T12:18:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=be566a2935d12e31a0f7d2df15f294a7c7ed9dce'/>
<id>be566a2935d12e31a0f7d2df15f294a7c7ed9dce</id>
<content type='text'>
We were ignoring the locked event. Wait for it instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We were ignoring the locked event. Wait for it instead.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove unused fields in swaylock_surface</title>
<updated>2023-01-27T11:19:32+00:00</updated>
<author>
<name>Manuel Stoeckl</name>
<email>code@mstoeckl.com</email>
</author>
<published>2023-01-14T20:16:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=4a44c306e73694594f804f84cb9f9821cc1d9e13'/>
<id>4a44c306e73694594f804f84cb9f9821cc1d9e13</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Estimate buffer size in advance for render_frame</title>
<updated>2023-01-27T11:19:32+00:00</updated>
<author>
<name>Manuel Stoeckl</name>
<email>code@mstoeckl.com</email>
</author>
<published>2023-01-14T19:51:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=10ab8b274020a9323413d093c45f13490929fb81'/>
<id>10ab8b274020a9323413d093c45f13490929fb81</id>
<content type='text'>
The size of the surface used to draw the indicator depends on
the extents of the text being drawn on and under the indicator.

This commit refactors the `render_frame` function so that the surface
size is computed before drawing; before, `render_frame` drew onto a
buffer, estimated the size the buffer should have had, and recursively
called itself to try again with the estimated size, if necessary. This
was done because Cairo's methods to estimate font and text size
require that a cairo_t context object and an associated cairo_surface
already have been set up. Since the surface size depends on the text
size, the natural way to use Cairo would have a circular dependency.

In order to compute sizes _before_ the buffer is created, this commit
adds a 1x1 surface and a matching `test_cairo` context which is set to
the same font and drawing parameters as the buffer that will be
created. Font/text extent measurements should give the same results as
for the final buffer.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The size of the surface used to draw the indicator depends on
the extents of the text being drawn on and under the indicator.

This commit refactors the `render_frame` function so that the surface
size is computed before drawing; before, `render_frame` drew onto a
buffer, estimated the size the buffer should have had, and recursively
called itself to try again with the estimated size, if necessary. This
was done because Cairo's methods to estimate font and text size
require that a cairo_t context object and an associated cairo_surface
already have been set up. Since the surface size depends on the text
size, the natural way to use Cairo would have a circular dependency.

In order to compute sizes _before_ the buffer is created, this commit
adds a 1x1 surface and a matching `test_cairo` context which is set to
the same font and drawing parameters as the buffer that will be
created. Font/text extent measurements should give the same results as
for the final buffer.
</pre>
</div>
</content>
</entry>
</feed>
