xwayland: Remove process exit status from libweston API

This shouldn't be relevant to the core.

Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Daniel Stone 2023-05-01 17:29:01 +01:00
parent f360818960
commit 104676ec1f
3 changed files with 6 additions and 8 deletions

View file

@ -99,7 +99,7 @@ xserver_cleanup(struct wet_process *process, int status, void *data)
* right one */
assert(process == wxw->process);
wxw->api->xserver_exited(wxw->xwayland, status);
wxw->api->xserver_exited(wxw->xwayland);
wxw->process = NULL;
}

View file

@ -37,7 +37,7 @@ extern "C" {
struct weston_compositor;
struct weston_xwayland;
#define WESTON_XWAYLAND_API_NAME "weston_xwayland_v2"
#define WESTON_XWAYLAND_API_NAME "weston_xwayland_v3"
#define WESTON_XWAYLAND_SURFACE_API_NAME "weston_xwayland_surface_v1"
typedef struct wl_client *
@ -102,10 +102,9 @@ struct weston_xwayland_api {
* socket, and may call the spawn function again.
*
* \param xwayland The Xwayland context object.
* \param exit_status The exit status of the Xwayland server process.
*/
void
(*xserver_exited)(struct weston_xwayland *xwayland, int exit_status);
(*xserver_exited)(struct weston_xwayland *xwayland);
};
/** Retrieve the API object for the libweston Xwayland module.

View file

@ -311,8 +311,7 @@ weston_xwayland_xserver_loaded(struct weston_xwayland *xwayland, int wm_fd)
}
static void
weston_xwayland_xserver_exited(struct weston_xwayland *xwayland,
int exit_status)
weston_xwayland_xserver_exited(struct weston_xwayland *xwayland)
{
struct weston_xserver *wxs = (struct weston_xserver *)xwayland;
@ -328,14 +327,14 @@ weston_xwayland_xserver_exited(struct weston_xwayland *xwayland,
weston_xserver_handle_event, wxs);
if (wxs->wm) {
weston_log("xserver exited, code %d\n", exit_status);
weston_log("xserver exited, will restart on demand\n");
weston_wm_destroy(wxs->wm);
wxs->wm = NULL;
} else {
/* If the X server crashes before it binds to the
* xserver interface, shut down and don't try
* again. */
weston_log("xserver crashing too fast: %d\n", exit_status);
weston_log("xserver crashing too fast, not restarting\n");
weston_xserver_shutdown(wxs);
}
}