Here is a lock file not created by smithay:
$ xxd /tmp/.X0-lock
00000000: 2020 2020 2020 2035 3537 0a 557.
And this is a lock file created by smithay:
$ xxd /tmp/.X23-lock
00000000: 2020 2020 3130 3733 3332 107332
As you see, the difference is a trailing newline (0x0a).
Lock files 1 to 22 where also created by smithay, because I started it a
couple of times. Reading these lock files fails, since the code expects
a file with at least 11 bytes of content: It uses read_exact() with a
buffer of length 11 in the Err()-branch of the match that this commit
modifies.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Handling SIGUSR1 requires setting a signal handler, which is a global
resource. This can also cause problems in the presence of threads, since
every thread needs to set up a signal handler. This commit instead
changes the code to use a pipe instead (actually a UnixStream). When the
child closes the pipe, the parent wakes up and knows "to do something".
Fixes: https://github.com/Smithay/smithay/issues/246
Signed-off-by: Uli Schlachter <psychon@znc.in>
libinput provides sub-pixel precision for pointer motion & touch events.
Keep this precision by switching all coordinates values from input
events to f64 (rather than i32 or u32). Otherwise, values are rounded
and part of the movment is lost.
Potentially fixes#224
slog-stdlog has a significant dependency tree and is basically unsued if
the downstream crate of Smithay always provides a logger (like anvil),
so it is not really needed.
Change the session backend to rely on Signaler to propagate its
signals. Also introduce the Linkable trait to allow generic composition
of objects needing to listen for signals.
Introduce the `backend_session_elogind` cargo feature which pulls
`backend_session_logind` and makes the logind session backend seek
`libelogind.so` instead of `libsystemd.so`.
Fixes#127