Skip to content

Unify process-launching implementation between Xwayland and 'weston_client'

Daniel Stone requested to merge daniels/weston:wet-client-7-restart into main

[this MR is sort of related to !932 (closed) / !941 (closed) / !951 (closed) in that it has some common heritage, but shares zero code with them]

weston_client is increasingly misnamed, and I haven't tackled that yet because I wanted to avoid rebase pain if it still requires significant change.

This MR furthers the split between weston_client_start (took a path to launch, returned a wl_client) and weston_client_launch (took a path to launch and a weston_client to fill in, returned a wl_client).

First the screenshooter is changed to use weston_client_start instead of weston_client_launch, since it only meaningfully referenced the client and not the process anyway. At this point, weston_client_launch has no (in-tree) users left.

The two functions are then split: weston_client_start is now responsible for creating a Wayland socket and a wl_client; the now-increasingly-misnamed weston_client_launch now only launches a process, taking a custom_env and an array of FDs to ensure are preserved for the child.

At this point, we can reuse weston_client_launch for Xwayland's process launching, as well as all the in-tree users of weston_client_start.

after this, I would probably rename weston_process to wet_process and weston_process_launch to wet_process_launch, make wet_process_launch return a newly-allocated wet_process, and delete process_info

Edited by Daniel Stone

Merge request reports

Loading