This way we can call cresize() to set the terminal size before creating
a tty or spawning a process, which will start with the correct size.
Signed-off-by: Christoph Lohmann <[email protected]>
if (openpty(&m, &s, NULL, NULL, &w) < 0)
die("openpty failed: %s\n", strerror(errno));
if (openpty(&m, &s, NULL, NULL, &w) < 0)
die("openpty failed: %s\n", strerror(errno));
switch (pid = fork()) {
case -1:
die("fork failed\n");
switch (pid = fork()) {
case -1:
die("fork failed\n");
xunloadfonts();
xloadfonts(usedfont, arg->f);
cresize(0, 0);
xunloadfonts();
xloadfonts(usedfont, arg->f);
cresize(0, 0);
tresize(col, row);
xresize(col, row);
tresize(col, row);
xresize(col, row);
return;
cresize(e->xconfigure.width, e->xconfigure.height);
return;
cresize(e->xconfigure.width, e->xconfigure.height);
}
} while (ev.type != MapNotify);
}
} while (ev.type != MapNotify);
+ ttynew();
+ ttyresize();
clock_gettime(CLOCK_MONOTONIC, &last);
lastblink = last;
clock_gettime(CLOCK_MONOTONIC, &last);
lastblink = last;