aboutsummaryrefslogtreecommitdiff
path: root/spawn.h (unfollow)
Commit message (Collapse)AuthorLines
2024-07-23spawn: add optional reaper callback, return pid_tDaniel Eklöf-3/+5
This will allow spawn() callers to do things when the spawned process has terminated.
2022-05-05url-mode: add support for XDG activation when opening URLsDaniel Eklöf-1/+2
First, add a ‘token’ argument to spawn(). When non-NULL, spawn() will set the ‘XDG_ACTIVATION_TOKEN’ environment variable in the forked process. If DISPLAY is non-NULL, we also set DESKTOP_STARTUP_ID, for compatibility with X11 applications. Note that failing to set either of these environment variables are considered non-fatal - i.e. we ignore failures. Next, add a helper function, wayl_get_activation_token(), to generate an XDG activation token, and call a user-provided callback when it’s ‘done (since token generation is asynchronous). This function takes an optional ‘seat’ and ‘serial’ arguments - when both are non-NULL/zero, we set the serial on the token. ‘win’ is a required argument, used to set the surface on the token. Re-write wayl_win_set_urgent() to use the new helper function. Finally, rewrite activate_url() to first try to get an activation token (and spawn the URL launcher in the token callback). If that fails, or if we don’t have XDG activation support, spawn the URL launcher immediately (like before this patch). Closes #1058
2021-02-07notify: break out command template expansion to spawn_expand_template()Daniel Eklöf-0/+6
2020-10-10selection: use appropriate check for PRIMARY pasteSergey Nazaryev-11/+2
Assume it could be a copy-paste typo. We should check PRIMARY, not CLIPBOARD. Without this fix, we can't use PRIMARY until we copy anything to CLIPBOARD.
2020-07-15spawn: add optional stdin/stdout/stderr redirection FDsDaniel Eklöf-1/+2
If not -1, spawn() will redirect the child's stdin/stdout/stderr to these FDs.
2020-07-15term: break out fork+exec functionality to a separate fileDaniel Eklöf-0/+6