mirror of
https://github.com/fairyglade/ly.git
synced 2026-03-23 16:56:04 +00:00
Fix active TTY detection for KMSCON
Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
@@ -568,14 +568,14 @@ pub fn main() !void {
|
||||
var inactivity_cmd_ran = false;
|
||||
|
||||
// Switch to selected TTY
|
||||
const active_tty = interop.getActiveTty(allocator) catch |err| no_tty_found: {
|
||||
const active_tty = interop.getActiveTty(allocator, use_kmscon_vt) catch |err| no_tty_found: {
|
||||
try info_line.addMessage(lang.err_get_active_tty, config.error_bg, config.error_fg);
|
||||
try log_file.err("sys", "failed to get active tty: {s}", .{@errorName(err)});
|
||||
break :no_tty_found build_options.fallback_tty;
|
||||
};
|
||||
interop.switchTty(active_tty) catch |err| {
|
||||
try info_line.addMessage(lang.err_switch_tty, config.error_bg, config.error_fg);
|
||||
try log_file.err("sys", "failed to switch tty: {s}", .{@errorName(err)});
|
||||
try log_file.err("sys", "failed to switch to tty {d}: {s}", .{ active_tty, @errorName(err) });
|
||||
};
|
||||
|
||||
if (config.initial_info_text) |text| {
|
||||
|
||||
Reference in New Issue
Block a user