mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-25 22:25:58 +01:00
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.
This commit is contained in:
parent
d3b84463f8
commit
3f40b0031f
2 changed files with 4 additions and 0 deletions
|
@ -41,6 +41,7 @@ struct wlr_xwayland_server {
|
||||||
struct wl_display *wl_display;
|
struct wl_display *wl_display;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
|
struct wl_signal start;
|
||||||
struct wl_signal ready;
|
struct wl_signal ready;
|
||||||
struct wl_signal destroy;
|
struct wl_signal destroy;
|
||||||
} events;
|
} events;
|
||||||
|
|
|
@ -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],
|
server->pipe_source = wl_event_loop_add_fd(loop, notify_fd[0],
|
||||||
WL_EVENT_READABLE, xserver_handle_ready, server);
|
WL_EVENT_READABLE, xserver_handle_ready, server);
|
||||||
|
|
||||||
|
wl_signal_emit_mutable(&server->events.start, NULL);
|
||||||
|
|
||||||
server->pid = fork();
|
server->pid = fork();
|
||||||
if (server->pid < 0) {
|
if (server->pid < 0) {
|
||||||
wlr_log_errno(WLR_ERROR, "fork failed");
|
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->wl_fd[0] = server->wl_fd[1] = -1;
|
||||||
server->wm_fd[0] = server->wm_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.ready);
|
||||||
wl_signal_init(&server->events.destroy);
|
wl_signal_init(&server->events.destroy);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue