Commit graph

5 commits

Author SHA1 Message Date
Heiko Becker
44713ac642 Include <fcntl.h> for open()
According to POSIX [1] that's where it is defined.

[1] https://pubs.opengroup.org/onlinepubs/009604499/basedefs/fcntl.h.html
2021-01-21 22:18:33 +01:00
Heiko Becker
7db93b7cd7 Replace uint with unsigned int
Improves portability by avoiding the non-standard 'uint'. For example
this fixes building with musl libc:

".../kwin_wrapper.c:45:9: error: unknown type name 'uint';
    did you mean 'int'?"
2021-01-21 22:00:33 +01:00
Adriaan de Groot
b42e4d1884 Missing includes (for strdup() and strlen()) 2020-12-16 13:53:24 +01:00
Adriaan de Groot
002d4737ee Use execvp() instead of execvpe()
Nothing here changes environ directly, and we're not interested
in passing a specific custom environment to kwin_wayland, so
don't use the (Linux-only) execvpe() for passing environment.
2020-12-16 13:53:24 +01:00
David Edmundson
86c6066551 Introduce helper to restart kwin on crash exit
Right now when kwin exits, the user is taken directly back to the login
screen. The login session exits, so all processes then are killed by the
session.

This patchset introduces a mechanism to safely restart kwin. The socket
(typically wayland-0) remains alive and persistent across restarts. This
means if any process reconnects through it's own mechanism or a crash
restart handler the socket appears to work, and blocks until the new
kwin restarts.

This makes it secure and race free.

If the screen was locked at the time kwin went down, this is also
secure. Kwin now checks the status from logind at the time of launch, so
will immediately restore a locked state before any other rendering.
2020-12-15 15:43:48 +00:00