mirror of https://github.com/fairyglade/ly.git
Fix TTY not being cleared sometimes (closes #696)
Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
parent
02729cce21
commit
cedb7a3b02
|
@ -783,6 +783,11 @@ pub fn main() !void {
|
||||||
try info_line.addMessage(lang.logout, config.bg, config.fg);
|
try info_line.addMessage(lang.logout, config.bg, config.fg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Clear the TTY because termbox2 doesn't properly do it
|
||||||
|
const capability = termbox.global.caps[termbox.TB_CAP_CLEAR_SCREEN];
|
||||||
|
const capability_slice = capability[0..std.mem.len(capability)];
|
||||||
|
_ = try std.posix.write(termbox.global.ttyfd, capability_slice);
|
||||||
|
|
||||||
try std.posix.tcsetattr(std.posix.STDIN_FILENO, .FLUSH, tb_termios);
|
try std.posix.tcsetattr(std.posix.STDIN_FILENO, .FLUSH, tb_termios);
|
||||||
if (auth_fails < config.auth_fails) _ = termbox.tb_clear();
|
if (auth_fails < config.auth_fails) _ = termbox.tb_clear();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue