aboutsummaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-11-23 06:31:33 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-11-23 06:31:33 +0000
commita5f3aa1278972e76571e6cc6d0e76b43f1e957cd (patch)
tree74dbfbd9b78dfa2254bf8144aad4ff94bb430b1f /server.c
parentMerge branch 'pgo' (diff)
parentclient: add new "--window-size-*" options to docs and CHANGELOG.md (diff)
Merge branch 'footclient-w'
Closes #189.
Diffstat (limited to 'server.c')
-rw-r--r--server.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/server.c b/server.c
index 464fc1f1..6e2f514f 100644
--- a/server.c
+++ b/server.c
@@ -263,6 +263,22 @@ fdm_client(struct fdm *fdm, int fd, int events, void *data)
else if (cdata.fullscreen)
client->conf.startup_mode = STARTUP_FULLSCREEN;
+ if (cdata.width > 0 && cdata.height > 0) {
+ client->conf.size.type = cdata.size_type;
+
+ switch (cdata.size_type) {
+ case CONF_SIZE_PX:
+ client->conf.size.px.width = cdata.width;
+ client->conf.size.px.height = cdata.height;
+ break;
+
+ case CONF_SIZE_CELLS:
+ client->conf.size.cells.width = cdata.width;
+ client->conf.size.cells.height = cdata.height;
+ break;
+ }
+ }
+
client->term = term_init(
&client->conf, server->fdm, server->reaper, server->wayl,
"footclient", cwd, cdata.argc, argv, &term_shutdown_handler, client);