xwayland: support xinitrc scripts to configure server on launch (#1963)

This commit is contained in:
Andrew J. Hesford 2024-07-20 04:40:11 -04:00 committed by GitHub
parent e4afa10fe4
commit 14d9bbab90
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 48 additions and 5 deletions

View file

@ -261,8 +261,8 @@ session_environment_init(void)
paths_destroy(&paths);
}
static void
run_session_script(const char *script)
void
session_run_script(const char *script)
{
struct wl_list paths;
paths_config_create(&paths, script);
@ -293,13 +293,13 @@ session_autostart_init(struct server *server)
{
/* Update dbus and systemd user environment, each may fail gracefully */
update_activation_env(server, /* initialize */ true);
run_session_script("autostart");
session_run_script("autostart");
}
void
session_shutdown(struct server *server)
{
run_session_script("shutdown");
session_run_script("shutdown");
/* Clear the dbus and systemd user environment, each may fail gracefully */
update_activation_env(server, /* initialize */ false);