86c6066551
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.
31 lines
617 B
C
31 lines
617 B
C
/*
|
|
KWin - the KDE window manager
|
|
This file is part of the KDE project.
|
|
|
|
SPDX-FileCopyrightText: 2020 <davidedmundson@kde.org>
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
/**
|
|
* Allocate and create a socket
|
|
* It is bound and accepted
|
|
*/
|
|
struct wl_socket *wl_socket_create();
|
|
|
|
/**
|
|
* Returns the file descriptor for the socket
|
|
*/
|
|
int wl_socket_get_fd(struct wl_socket *);
|
|
|
|
/**
|
|
* Returns the name of the socket, i.e "wayland-0"
|
|
*/
|
|
char *wl_socket_get_display_name(struct wl_socket *);
|
|
|
|
/**
|
|
* Cleanup resources and close the FD
|
|
*/
|
|
void wl_socket_destroy(struct wl_socket *socket);
|