<feed xmlns='http://www.w3.org/2005/Atom'>
<title>swaylock/.git/include, branch v1.7.2</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>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>
<entry>
<title>renderer: work with current buffer locally</title>
<updated>2022-11-14T20:06:41+00:00</updated>
<author>
<name>Alexander Orzechowski</name>
<email>orzechowski.alexander@gmail.com</email>
</author>
<published>2022-09-24T08:18:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=5c1b16b957bfc45010dd22a03aa8f5135d3bac0c'/>
<id>5c1b16b957bfc45010dd22a03aa8f5135d3bac0c</id>
<content type='text'>
No need to store this globally accessible struct member.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No need to store this globally accessible struct member.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use mlock for password buffer</title>
<updated>2022-06-15T08:49:32+00:00</updated>
<author>
<name>Robin Ebert</name>
<email>ebertrobin2002@gmail.com</email>
</author>
<published>2022-05-30T09:50:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=bdeb891378bfcb2dc79de41cfeb6a62807d09b20'/>
<id>bdeb891378bfcb2dc79de41cfeb6a62807d09b20</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Delete whole utf8 character on backspace</title>
<updated>2022-03-22T21:11:27+00:00</updated>
<author>
<name>Johan Malm</name>
<email>jgm323@gmail.com</email>
</author>
<published>2022-03-20T20:59:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=11030b73509f698973f81c0cd7b8d6c83598d867'/>
<id>11030b73509f698973f81c0cd7b8d6c83598d867</id>
<content type='text'>
...rather than just the last byte of the password buffer.

Demostrate the need for this by taking the following steps:
- Apply the patch below (before this commit).
- Set keyboard layout to one where utf8 characters longer than one byte
  can be obtained, for example åäö using Swedish layout
  (XKB_DEFAULT_LAYOUT=se).
- Type "åäö" then press backspace and observe that it takes two
  backspaces to delete each character fully, and therefore six
  backspaces to fully clear the password buffer.

diff --git a/password.c b/password.c
index e1a1d9a..b640cd3 100644
--- a/password.c
+++ b/password.c
@@ -29,6 +29,7 @@ void clear_password_buffer(struct swaylock_password *pw) {
 static bool backspace(struct swaylock_password *pw) {
 	if (pw-&gt;len != 0) {
 		pw-&gt;buffer[--pw-&gt;len] = 0;
+		fprintf(stderr, "%s\n", pw-&gt;buffer);
 		return true;
 	}
 	return false;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
...rather than just the last byte of the password buffer.

Demostrate the need for this by taking the following steps:
- Apply the patch below (before this commit).
- Set keyboard layout to one where utf8 characters longer than one byte
  can be obtained, for example åäö using Swedish layout
  (XKB_DEFAULT_LAYOUT=se).
- Type "åäö" then press backspace and observe that it takes two
  backspaces to delete each character fully, and therefore six
  backspaces to fully clear the password buffer.

diff --git a/password.c b/password.c
index e1a1d9a..b640cd3 100644
--- a/password.c
+++ b/password.c
@@ -29,6 +29,7 @@ void clear_password_buffer(struct swaylock_password *pw) {
 static bool backspace(struct swaylock_password *pw) {
 	if (pw-&gt;len != 0) {
 		pw-&gt;buffer[--pw-&gt;len] = 0;
+		fprintf(stderr, "%s\n", pw-&gt;buffer);
 		return true;
 	}
 	return false;
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove redundant function render_frames()</title>
<updated>2022-03-20T21:54:39+00:00</updated>
<author>
<name>Johan Malm</name>
<email>jgm323@gmail.com</email>
</author>
<published>2022-03-20T21:08:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=06d22a8deac2acc465b9eb7264db3729d49f6edd'/>
<id>06d22a8deac2acc465b9eb7264db3729d49f6edd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>cairo.h: remove redundant prototype</title>
<updated>2022-03-20T21:54:39+00:00</updated>
<author>
<name>Johan Malm</name>
<email>jgm323@gmail.com</email>
</author>
<published>2022-03-20T21:07:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=03b75eaf44644fc8fb49b0b75a8c2574b956aa50'/>
<id>03b75eaf44644fc8fb49b0b75a8c2574b956aa50</id>
<content type='text'>
cairo_surface_t *cairo_image_surface_scale();
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
cairo_surface_t *cairo_image_surface_scale();
</pre>
</div>
</content>
</entry>
<entry>
<title>Drop xdg-output requirement</title>
<updated>2022-03-10T09:31:51+00:00</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2022-02-02T15:43:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=2813756a1919ecdea84b2bb164320104aec371ef'/>
<id>2813756a1919ecdea84b2bb164320104aec371ef</id>
<content type='text'>
Rely on wl_output v4 instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rely on wl_output v4 instead.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for ext-session-lock-v1</title>
<updated>2022-02-02T14:30:45+00:00</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2021-12-20T16:25:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=1d1c75b6316d21933069a9d201f966d84099f6ca'/>
<id>1d1c75b6316d21933069a9d201f966d84099f6ca</id>
<content type='text'>
This is a new protocol to lock the session [1]. It should be more
reliable than layer-shell + input-inhibitor.

[1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/131
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a new protocol to lock the session [1]. It should be more
reliable than layer-shell + input-inhibitor.

[1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/131
</pre>
</div>
</content>
</entry>
</feed>
