mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-22 01:40:17 -05:00
config: replace union in config struct with simple width/height members
This commit is contained in:
parent
0beed9fcf6
commit
adde947fc5
5 changed files with 16 additions and 46 deletions
14
server.c
14
server.c
|
|
@ -265,18 +265,8 @@ fdm_client(struct fdm *fdm, int fd, int events, void *data)
|
|||
|
||||
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->conf.size.width = cdata.width;
|
||||
client->conf.size.height = cdata.height;
|
||||
}
|
||||
|
||||
client->term = term_init(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue