diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-03-27 20:16:42 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-03-27 20:16:42 +0000 |
| commit | 598ac4bcd0690995fbf94c7a2b17564dbf69a5f1 (patch) | |
| tree | 0d98b2eab053838eca647a1bd4b680dc20f90156 /terminal.c | |
| parent | conf: max-shm-pool-size-mb=0 now disables SHM scrolling (diff) | |
| parent | client: add --maximized and --fullscreen (diff) | |
Merge branch 'master' into scroll-damage-performance
Diffstat (limited to 'terminal.c')
| -rw-r--r-- | terminal.c | 23 |
1 files changed, 20 insertions, 3 deletions
@@ -13,6 +13,7 @@ #include <sys/timerfd.h> #include <fcntl.h> #include <linux/input-event-codes.h> +#include <xdg-shell.h> #define LOG_MODULE "terminal" #define LOG_ENABLE_DBG 0 @@ -615,8 +616,7 @@ load_fonts_from_conf(const struct terminal *term, const struct config *conf, struct terminal * term_init(const struct config *conf, struct fdm *fdm, struct wayland *wayl, - const char *term_env, bool login_shell, const char *foot_exe, - const char *cwd, int argc, char *const *argv, + const char *foot_exe, const char *cwd, int argc, char *const *argv, void (*shutdown_cb)(void *data, int exit_code), void *shutdown_data) { int ptmx = -1; @@ -800,9 +800,26 @@ term_init(const struct config *conf, struct fdm *fdm, struct wayland *wayl, /* Let the Wayland backend know we exist */ tll_push_back(wayl->terms, term); + switch (conf->startup_mode) { + case STARTUP_WINDOWED: + break; + + case STARTUP_MAXIMIZED: + xdg_toplevel_set_maximized(term->window->xdg_toplevel); + break; + + case STARTUP_FULLSCREEN: + xdg_toplevel_set_fullscreen(term->window->xdg_toplevel, NULL); + break; + } + /* Start the slave/client */ - if ((term->slave = slave_spawn(term->ptmx, argc, term->cwd, argv, term_env, conf->shell, login_shell)) == -1) + if ((term->slave = slave_spawn( + term->ptmx, argc, term->cwd, argv, + conf->term, conf->shell, conf->login_shell)) == -1) + { goto err; + } return term; |
