diff options
author | Simon Ser <contact@emersion.fr> | 2022-10-18 13:49:18 +0200 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2022-11-18 15:35:20 +0000 |
commit | 3f40b0031f457da6133551f972d0a001d6141121 (patch) | |
tree | 8f51dc6bdc4a1bf10a84727661f7f8103d99ca96 | |
parent | d3b84463f8d6d483f446b3cdd18fcff031bc830c (diff) |
xwayland/server: add start signal
This can be used to know when wlr_xwayland_server decides to start
a new Xwayland process. At that point the wl_client has already
been created but the Xwayland process hasn't been started yet.
-rw-r--r-- | include/wlr/xwayland/server.h | 1 | ||||
-rw-r--r-- | xwayland/server.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/wlr/xwayland/server.h b/include/wlr/xwayland/server.h index 9fa82d8e..a2a0dd0b 100644 --- a/include/wlr/xwayland/server.h +++ b/include/wlr/xwayland/server.h @@ -41,6 +41,7 @@ struct wlr_xwayland_server { struct wl_display *wl_display; struct { + struct wl_signal start; struct wl_signal ready; struct wl_signal destroy; } events; diff --git a/xwayland/server.c b/xwayland/server.c index 75b919b4..175a003e 100644 --- a/xwayland/server.c +++ b/xwayland/server.c @@ -365,6 +365,8 @@ static bool server_start(struct wlr_xwayland_server *server) { server->pipe_source = wl_event_loop_add_fd(loop, notify_fd[0], WL_EVENT_READABLE, xserver_handle_ready, server); + wl_signal_emit_mutable(&server->events.start, NULL); + server->pid = fork(); if (server->pid < 0) { wlr_log_errno(WLR_ERROR, "fork failed"); @@ -460,6 +462,7 @@ struct wlr_xwayland_server *wlr_xwayland_server_create( server->wl_fd[0] = server->wl_fd[1] = -1; server->wm_fd[0] = server->wm_fd[1] = -1; + wl_signal_init(&server->events.start); wl_signal_init(&server->events.ready); wl_signal_init(&server->events.destroy); |