<feed xmlns='http://www.w3.org/2005/Atom'>
<title>swaylock/.git/password.c, branch v1.8.0</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>Show cleared state when backspacing last character</title>
<updated>2024-08-22T07:02:10+00:00</updated>
<author>
<name>iyzana</name>
<email>16743652+iyzana@users.noreply.github.com</email>
</author>
<published>2023-06-29T09:21:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=c2dcd40c341bc7a8ce00030cea2feb2f4c5c3026'/>
<id>c2dcd40c341bc7a8ce00030cea2feb2f4c5c3026</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Clear password on ctrl+backpace and ctrl+delete</title>
<updated>2023-12-10T12:02:22+00:00</updated>
<author>
<name>prezmop</name>
<email>60825986+prezmop@users.noreply.github.com</email>
</author>
<published>2023-12-09T08:30:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=f2298bdbf788678a9e08fd17a3e37600767f5a9b'/>
<id>f2298bdbf788678a9e08fd17a3e37600767f5a9b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</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>Accept input while validating</title>
<updated>2023-04-14T07:55:19+00:00</updated>
<author>
<name>Hugo Osvaldo Barrera</name>
<email>hugo@whynothugo.nl</email>
</author>
<published>2022-09-02T16:42:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=876965f944f127a32c0265bcaa47f716d9e1451b'/>
<id>876965f944f127a32c0265bcaa47f716d9e1451b</id>
<content type='text'>
Allow typing new input while the previous one is validating. Can be
tested with:

    ninja -C build &amp;&amp; sway -c sway.conf

Where sway.config is:

    exec ./build/swaylock

Fixes: https://github.com/swaywm/swaylock/issues/241
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allow typing new input while the previous one is validating. Can be
tested with:

    ninja -C build &amp;&amp; sway -c sway.conf

Where sway.config is:

    exec ./build/swaylock

Fixes: https://github.com/swaywm/swaylock/issues/241
</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>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>Submit password by pressing Ctrl+m</title>
<updated>2019-08-15T15:47:27+00:00</updated>
<author>
<name>HardDie</name>
<email>oleg1995sysoev@yandex.ru</email>
</author>
<published>2019-08-15T13:17:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=ba31e2eaee6a08514a449916491f9a446e745770'/>
<id>ba31e2eaee6a08514a449916491f9a446e745770</id>
<content type='text'>
As it work in emacs style console</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As it work in emacs style console</pre>
</div>
</content>
</entry>
<entry>
<title>Submit password by pressing Ctrl+m (close #75)</title>
<updated>2019-04-29T14:37:47+00:00</updated>
<author>
<name>Gabriel Sanches</name>
<email>g@lonemaker.com</email>
</author>
<published>2019-04-29T14:10:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=84bfc6c7edf1465096f6663c6d931981bd924280'/>
<id>84bfc6c7edf1465096f6663c6d931981bd924280</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Check password without blocking</title>
<updated>2019-01-17T11:42:13+00:00</updated>
<author>
<name>emersion</name>
<email>contact@emersion.fr</email>
</author>
<published>2019-01-17T11:42:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=c77f0eb4ed6af1fad071be0113b3822b96b561aa'/>
<id>c77f0eb4ed6af1fad071be0113b3822b96b561aa</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
