|
|
@@ -1,83 +1,189 @@
|
|
|
-/* bootscan: live tail of the boot storage-scan kernel thread's output.
|
|
|
+/* bootscan: live tail of the kernel's boot logs.
|
|
|
*
|
|
|
- * The kernel captures every COM1 character boot_storage_main() writes (the
|
|
|
- * vfs/blk mount trail, the driver probes and the final boot traces) into a
|
|
|
- * ring exposed by SYS_BOOTLOG. The WM spawns this window before the first
|
|
|
- * terminal, so the terminal is created last and keeps the keyboard focus.
|
|
|
+ * SYS_BOOTLOG exposes three sources: the direct-LFB boot console text (the
|
|
|
+ * `bootlog` command), the always-on COM1 capture (`seriallog`) and the boot
|
|
|
+ * storage-scan kernel thread's own trail. Each tab keeps its own scrollback;
|
|
|
+ * the Serial tab is the complete boot trail (it starts with the first kernel
|
|
|
+ * line and keeps growing for later driver output, the deferred USB mounts and
|
|
|
+ * the WiFi helper).
|
|
|
*
|
|
|
- * The view follows the tail while the scan runs and keeps the scrollback
|
|
|
- * afterwards. Wheel, PgUp/PgDn, Up/Down, Home and End scroll; scrolling up
|
|
|
- * stops the follow until the bottom is reached again. Esc closes it.
|
|
|
+ * The WM spawns this window before the first terminal, so the terminal is
|
|
|
+ * created last and keeps the keyboard focus.
|
|
|
+ *
|
|
|
+ * Every tab follows the newest output while it is at the bottom; wheel,
|
|
|
+ * PgUp/PgDn, Up/Down, Home and End scroll, and scrolling up stops the follow
|
|
|
+ * until the bottom is reached again. Click a tab, press 1/2/3 or Tab to
|
|
|
+ * switch; Esc closes the window.
|
|
|
*/
|
|
|
|
|
|
#include "ucmd_lib.h"
|
|
|
#include "ngui.h"
|
|
|
|
|
|
-#define TEXT_MAX (32 * 1024)
|
|
|
#define POLL_MS 100
|
|
|
#define LINE_PX 12
|
|
|
#define PAD 8
|
|
|
+#define TAB_H 24
|
|
|
#define FOOT_H 20
|
|
|
|
|
|
+enum { TAB_BOOT, TAB_SERIAL, TAB_SCAN, TAB_COUNT };
|
|
|
+
|
|
|
+struct logsrc {
|
|
|
+ const char *label;
|
|
|
+ int kind;
|
|
|
+ char *text;
|
|
|
+ unsigned int cap; /* text[] size (at least the kernel window) */
|
|
|
+ unsigned int len; /* bytes held in text[] */
|
|
|
+ unsigned int base; /* absolute offset of text[0] */
|
|
|
+ unsigned int seen; /* absolute offset fetched up to */
|
|
|
+ unsigned int total; /* source counters from the last poll */
|
|
|
+ unsigned int rstart;
|
|
|
+ unsigned int rcap;
|
|
|
+ int active;
|
|
|
+ int have_info;
|
|
|
+ int fresh; /* new output arrived while the tab was hidden */
|
|
|
+ int trim_lines; /* lines dropped from the front since the draw */
|
|
|
+};
|
|
|
+
|
|
|
+/* At least the kernel's window for each source (BOOTCON_LOG_PAGES,
|
|
|
+ * BOOTCON_SERLOG_PAGES, BOOTCON_SCAN_PAGES in kernel/bootcon.h). */
|
|
|
+static char boot_text[32 * 1024];
|
|
|
+static char serial_text[128 * 1024];
|
|
|
+static char scan_text[16 * 1024];
|
|
|
+
|
|
|
+static struct logsrc src[TAB_COUNT] = {
|
|
|
+ { .label = "Boot", .kind = SYS_BOOTLOG_BOOT,
|
|
|
+ .text = boot_text, .cap = sizeof(boot_text) },
|
|
|
+ { .label = "Serial", .kind = SYS_BOOTLOG_SERIAL,
|
|
|
+ .text = serial_text, .cap = sizeof(serial_text) },
|
|
|
+ { .label = "Scan", .kind = SYS_BOOTLOG_SCAN,
|
|
|
+ .text = scan_text, .cap = sizeof(scan_text) },
|
|
|
+};
|
|
|
+
|
|
|
static struct ngui ui;
|
|
|
static struct ngui_scroll sc;
|
|
|
-static char text[TEXT_MAX];
|
|
|
-static unsigned int text_len;
|
|
|
-static unsigned int seen;
|
|
|
+static int cur = TAB_SERIAL;
|
|
|
static int follow = 1;
|
|
|
static int pending_tail;
|
|
|
-static int have_info;
|
|
|
-static int scan_active;
|
|
|
-static unsigned int scan_cap;
|
|
|
+static int pressed_tab = -1;
|
|
|
static int quit;
|
|
|
|
|
|
-static void append_text(const char *p, unsigned int n)
|
|
|
+static unsigned int count_lines(const struct logsrc *s)
|
|
|
{
|
|
|
- unsigned int i;
|
|
|
+ unsigned int i, n = 0;
|
|
|
|
|
|
- for (i = 0; i < n && text_len + 1 < TEXT_MAX; i++)
|
|
|
- text[text_len++] = p[i];
|
|
|
+ if (!s->len)
|
|
|
+ return 0;
|
|
|
+ for (i = 0; i < s->len; i++)
|
|
|
+ if (s->text[i] == '\n')
|
|
|
+ n++;
|
|
|
+ if (s->text[s->len - 1] != '\n')
|
|
|
+ n++;
|
|
|
+ return n;
|
|
|
+}
|
|
|
+
|
|
|
+static unsigned short line_color(const char *s, unsigned int n)
|
|
|
+{
|
|
|
+ if (n >= 4 && s[0] == 'v' && s[1] == 'f' && s[2] == 's' &&
|
|
|
+ s[3] == ':')
|
|
|
+ return ui.theme.accent;
|
|
|
+ if (n >= 4 && s[0] == 'b' && s[1] == 'l' && s[2] == 'k' &&
|
|
|
+ s[3] == ':')
|
|
|
+ return ui.theme.text_dim;
|
|
|
+ if (n >= 6 && s[0] == '[' && s[1] == 'b' && s[2] == 'o' &&
|
|
|
+ s[3] == 'o' && s[4] == 't' && s[5] == ']')
|
|
|
+ return ui.theme.text_dim;
|
|
|
+ return ui.theme.text;
|
|
|
+}
|
|
|
+
|
|
|
+/* Drop the oldest `drop` bytes, remembering how many text lines vanished so
|
|
|
+ * an unfollowed view can keep its place. */
|
|
|
+static void trim_front(struct logsrc *s, unsigned int drop)
|
|
|
+{
|
|
|
+ unsigned int i, lines = 0;
|
|
|
+
|
|
|
+ if (drop > s->len)
|
|
|
+ drop = s->len;
|
|
|
+ for (i = 0; i < drop; i++)
|
|
|
+ if (s->text[i] == '\n')
|
|
|
+ lines++;
|
|
|
+ for (i = 0; i + drop < s->len; i++)
|
|
|
+ s->text[i] = s->text[i + drop];
|
|
|
+ s->len -= drop;
|
|
|
+ s->base += drop;
|
|
|
+ s->trim_lines += (int)lines;
|
|
|
+}
|
|
|
+
|
|
|
+static void append_text(struct logsrc *s, const char *p, unsigned int n)
|
|
|
+{
|
|
|
+ unsigned int i, need;
|
|
|
+
|
|
|
+ if (n > s->cap) {
|
|
|
+ unsigned int skip = n - s->cap;
|
|
|
+
|
|
|
+ /* Not reachable with SYS_BOOTLOG_CHUNK-sized reads, but keep
|
|
|
+ * the absolute mapping consistent if a buffer ever shrinks. */
|
|
|
+ p += skip;
|
|
|
+ s->base += skip;
|
|
|
+ n = s->cap;
|
|
|
+ }
|
|
|
+ if (s->len + n > s->cap) {
|
|
|
+ need = s->len + n - s->cap;
|
|
|
+ /* Drop in quarter-buffer steps instead of copying the whole
|
|
|
+ * buffer for every chunk once it is full. */
|
|
|
+ if (need < s->cap / 4)
|
|
|
+ need = s->cap / 4;
|
|
|
+ trim_front(s, need);
|
|
|
+ }
|
|
|
+ for (i = 0; i < n; i++)
|
|
|
+ s->text[s->len++] = p[i];
|
|
|
}
|
|
|
|
|
|
/* Fetch every byte that appeared since the last poll. Returns 1 when the
|
|
|
* view changed. */
|
|
|
-static int pull(void)
|
|
|
+static int pull(struct logsrc *s)
|
|
|
{
|
|
|
struct sys_bootlog info;
|
|
|
int changed = 0;
|
|
|
int passes = 0;
|
|
|
|
|
|
- if (u_bootlog_stat(&info) != 0)
|
|
|
+ if (u_bootlog_stat(s->kind, &info) != 0)
|
|
|
return 0;
|
|
|
- if (!have_info || info.active != (unsigned int)scan_active ||
|
|
|
- info.capacity != scan_cap) {
|
|
|
- have_info = 1;
|
|
|
- scan_active = (int)info.active;
|
|
|
- scan_cap = info.capacity;
|
|
|
+ if (!s->have_info || s->total != info.total ||
|
|
|
+ s->rstart != info.start || s->rcap != info.capacity ||
|
|
|
+ s->active != (int)info.active) {
|
|
|
+ s->have_info = 1;
|
|
|
+ s->total = info.total;
|
|
|
+ s->rstart = info.start;
|
|
|
+ s->rcap = info.capacity;
|
|
|
+ s->active = (int)info.active;
|
|
|
changed = 1;
|
|
|
}
|
|
|
if (!info.capacity)
|
|
|
return changed;
|
|
|
- if (seen < info.start || seen > info.total)
|
|
|
- seen = info.start;
|
|
|
- while (seen < info.total && passes++ < 64) {
|
|
|
+
|
|
|
+ /* The source dropped bytes we still hold (the Serial window keeps the
|
|
|
+ * newest bytes, the Scan ring overwrites). */
|
|
|
+ if (info.start > s->base)
|
|
|
+ trim_front(s, info.start - s->base);
|
|
|
+ if (info.start > s->base) {
|
|
|
+ s->base = info.start;
|
|
|
+ s->len = 0;
|
|
|
+ }
|
|
|
+ s->seen = s->base + s->len;
|
|
|
+
|
|
|
+ while (s->seen < info.total && passes++ < 64) {
|
|
|
char chunk[SYS_BOOTLOG_CHUNK];
|
|
|
- int n = u_bootlog_read(seen, chunk);
|
|
|
+ int n = u_bootlog_read(s->kind, s->seen, chunk);
|
|
|
|
|
|
if (n < 0) {
|
|
|
- /* The ring wrapped between the two calls. */
|
|
|
- if (u_bootlog_stat(&info) != 0)
|
|
|
- break;
|
|
|
- if (seen < info.start || seen > info.total)
|
|
|
- seen = info.start;
|
|
|
- if (seen >= info.total)
|
|
|
- break;
|
|
|
- continue;
|
|
|
+ /* The source wrapped between the two calls. */
|
|
|
+ s->have_info = 0;
|
|
|
+ break;
|
|
|
}
|
|
|
if (n == 0)
|
|
|
break;
|
|
|
- append_text(chunk, (unsigned int)n);
|
|
|
- seen += (unsigned int)n;
|
|
|
+ append_text(s, chunk, (unsigned int)n);
|
|
|
+ s->seen += (unsigned int)n;
|
|
|
changed = 1;
|
|
|
if ((unsigned int)n < SYS_BOOTLOG_CHUNK)
|
|
|
break;
|
|
|
@@ -85,52 +191,126 @@ static int pull(void)
|
|
|
return changed;
|
|
|
}
|
|
|
|
|
|
-static unsigned int count_lines(void)
|
|
|
+static struct ngui_rect tab_rect(int i)
|
|
|
{
|
|
|
- unsigned int i, n = 0;
|
|
|
+ struct ngui_rect r;
|
|
|
+ int x = PAD, j;
|
|
|
+
|
|
|
+ r.y = 3;
|
|
|
+ r.h = TAB_H - 6;
|
|
|
+ for (j = 0; j < i; j++)
|
|
|
+ x += (int)ngui_text_width_ui(&ui, src[j].label) + 32;
|
|
|
+ r.x = x;
|
|
|
+ r.w = (int)ngui_text_width_ui(&ui, src[i].label) + 30;
|
|
|
+ return r;
|
|
|
+}
|
|
|
|
|
|
- if (!text_len)
|
|
|
- return 0;
|
|
|
- for (i = 0; i < text_len; i++)
|
|
|
- if (text[i] == '\n')
|
|
|
- n++;
|
|
|
- if (text[text_len - 1] != '\n')
|
|
|
- n++;
|
|
|
- return n;
|
|
|
+static void draw_tabs(void)
|
|
|
+{
|
|
|
+ struct ngui_rect hr = { 0, 0, ui.w, TAB_H };
|
|
|
+ struct ngui_rect br = { 0, TAB_H - 1, ui.w, 1 };
|
|
|
+ int i;
|
|
|
+
|
|
|
+ ngui_fill_rect(&ui, hr, ui.theme.panel);
|
|
|
+ ngui_fill_rect(&ui, br, ui.theme.border);
|
|
|
+ for (i = 0; i < TAB_COUNT; i++) {
|
|
|
+ struct ngui_rect r = tab_rect(i);
|
|
|
+ int hot = ui.inside &&
|
|
|
+ ngui_rect_contains(&r, ui.mouse_x, ui.mouse_y);
|
|
|
+ int lh = ngui_text_line_height(&ui, LINE_PX, 0);
|
|
|
+ int ty = r.y + (r.h - lh) / 2;
|
|
|
+ unsigned short color;
|
|
|
+
|
|
|
+ if (i == cur)
|
|
|
+ ngui_fill_rect(&ui, r, ui.theme.panel_alt);
|
|
|
+ else if (hot)
|
|
|
+ ngui_fill_rect(&ui, r, ui.theme.button);
|
|
|
+ color = (i == cur || hot) ? ui.theme.text : ui.theme.text_dim;
|
|
|
+ if (ty < r.y)
|
|
|
+ ty = r.y;
|
|
|
+ ngui_text(&ui, r.x + 10, ty, src[i].label, color);
|
|
|
+ if (i == cur)
|
|
|
+ ngui_fill_rect(&ui, (struct ngui_rect){ r.x, TAB_H - 3,
|
|
|
+ r.w, 2 },
|
|
|
+ ui.theme.accent);
|
|
|
+ if (src[i].fresh && i != cur)
|
|
|
+ ngui_fill_round_rect(&ui, (struct ngui_rect){
|
|
|
+ r.x + r.w - 12,
|
|
|
+ r.y + r.h / 2 - 2, 4, 4 },
|
|
|
+ 2, 2, 2, 2, ui.theme.accent);
|
|
|
+ if (hot)
|
|
|
+ ngui_set_cursor(&ui, CURSOR_DEFAULT);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
-static unsigned short line_color(const char *s, unsigned int n)
|
|
|
+static int tab_hit(int x, int y)
|
|
|
{
|
|
|
- if (n >= 4 && s[0] == 'v' && s[1] == 'f' && s[2] == 's' &&
|
|
|
- s[3] == ':')
|
|
|
- return ui.theme.accent;
|
|
|
- if (n >= 4 && s[0] == 'b' && s[1] == 'l' && s[2] == 'k' &&
|
|
|
- s[3] == ':')
|
|
|
- return ui.theme.text_dim;
|
|
|
- if (n >= 6 && s[0] == '[' && s[1] == 'b' && s[2] == 'o' &&
|
|
|
- s[3] == 'o' && s[4] == 't' && s[5] == ']')
|
|
|
- return ui.theme.text_dim;
|
|
|
- return ui.theme.text;
|
|
|
+ int i;
|
|
|
+
|
|
|
+ for (i = 0; i < TAB_COUNT; i++) {
|
|
|
+ struct ngui_rect r = tab_rect(i);
|
|
|
+
|
|
|
+ if (ngui_rect_contains(&r, x, y))
|
|
|
+ return i;
|
|
|
+ }
|
|
|
+ return -1;
|
|
|
+}
|
|
|
+
|
|
|
+static void select_tab(int i)
|
|
|
+{
|
|
|
+ if (i < 0 || i >= TAB_COUNT || i == cur)
|
|
|
+ return;
|
|
|
+ cur = i;
|
|
|
+ src[i].fresh = 0;
|
|
|
+ src[i].trim_lines = 0;
|
|
|
+ sc.offset = 0;
|
|
|
+ follow = 1;
|
|
|
+ pending_tail = 1;
|
|
|
+ ngui_invalidate(&ui);
|
|
|
+}
|
|
|
+
|
|
|
+static void tab_input(void)
|
|
|
+{
|
|
|
+ int i;
|
|
|
+
|
|
|
+ if (ui.pressed)
|
|
|
+ pressed_tab = tab_hit(ui.press_x, ui.press_y);
|
|
|
+ if (ui.released) {
|
|
|
+ i = tab_hit(ui.release_x, ui.release_y);
|
|
|
+ if (i >= 0 && i == pressed_tab)
|
|
|
+ select_tab(i);
|
|
|
+ pressed_tab = -1;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
static void draw_footer(struct ngui_rect r)
|
|
|
{
|
|
|
const char *status;
|
|
|
- const char *hint = "PgUp/PgDn scroll | Esc close";
|
|
|
+ const char *hint = "1/2/3 tabs | PgUp/PgDn | Esc";
|
|
|
unsigned short color;
|
|
|
int hint_w;
|
|
|
-
|
|
|
- if (!have_info || (!scan_cap && !scan_active))
|
|
|
- status = "waiting for the boot scan...";
|
|
|
- else if (!scan_cap)
|
|
|
- status = "boot scan log unavailable";
|
|
|
- else if (scan_active)
|
|
|
- status = "live: boot scan running";
|
|
|
- else
|
|
|
- status = "boot scan finished";
|
|
|
-
|
|
|
- color = scan_active ? (scan_cap ? ui.theme.success : ui.theme.warning) :
|
|
|
- ui.theme.text_dim;
|
|
|
+ struct logsrc *s = &src[cur];
|
|
|
+
|
|
|
+ if (!s->have_info) {
|
|
|
+ status = "waiting for the kernel log...";
|
|
|
+ color = ui.theme.text_dim;
|
|
|
+ } else if (!s->rcap) {
|
|
|
+ status = s->kind == SYS_BOOTLOG_SCAN ?
|
|
|
+ "boot scan log unavailable" : "log unavailable";
|
|
|
+ color = ui.theme.warning;
|
|
|
+ } else if (s->kind == SYS_BOOTLOG_BOOT) {
|
|
|
+ status = s->active ? "boot console: live" :
|
|
|
+ "boot console: full";
|
|
|
+ color = s->active ? ui.theme.success : ui.theme.text_dim;
|
|
|
+ } else if (s->kind == SYS_BOOTLOG_SERIAL) {
|
|
|
+ status = s->rstart ? "serial log: live, oldest dropped" :
|
|
|
+ "serial log: live";
|
|
|
+ color = ui.theme.success;
|
|
|
+ } else {
|
|
|
+ status = s->active ? "live: boot scan running" :
|
|
|
+ "boot scan finished";
|
|
|
+ color = s->active ? ui.theme.success : ui.theme.text_dim;
|
|
|
+ }
|
|
|
|
|
|
ngui_fill_rect(&ui, r, ui.theme.panel);
|
|
|
ngui_text(&ui, r.x + 2, r.y + 3, status, color);
|
|
|
@@ -143,18 +323,23 @@ static void draw_footer(struct ngui_rect r)
|
|
|
static void draw(void)
|
|
|
{
|
|
|
struct ngui_rect body, foot;
|
|
|
+ struct logsrc *s = &src[cur];
|
|
|
int line_h = ngui_text_line_height(&ui, LINE_PX, 1);
|
|
|
- unsigned int lines = count_lines();
|
|
|
+ unsigned int lines = count_lines(s);
|
|
|
unsigned int pos = 0, idx = 0;
|
|
|
int max, y;
|
|
|
|
|
|
if (line_h < 10)
|
|
|
line_h = 10;
|
|
|
|
|
|
+ ngui_fill_rect(&ui, (struct ngui_rect){ 0, 0, ui.w, ui.h },
|
|
|
+ ui.theme.bg);
|
|
|
+ draw_tabs();
|
|
|
+
|
|
|
body.x = PAD;
|
|
|
- body.y = PAD;
|
|
|
+ body.y = TAB_H + 2;
|
|
|
body.w = ui.w - 2 * PAD;
|
|
|
- body.h = ui.h - 2 * PAD - FOOT_H;
|
|
|
+ body.h = ui.h - body.y - FOOT_H - 2;
|
|
|
if (body.w < 20)
|
|
|
body.w = 20;
|
|
|
if (body.h < 20)
|
|
|
@@ -165,10 +350,15 @@ static void draw(void)
|
|
|
foot.w = ui.w;
|
|
|
foot.h = FOOT_H;
|
|
|
|
|
|
- ngui_fill_rect(&ui, (struct ngui_rect){ 0, 0, ui.w, ui.h },
|
|
|
- ui.theme.bg);
|
|
|
-
|
|
|
sc.content_h = (int)lines * line_h;
|
|
|
+ if (s->trim_lines) {
|
|
|
+ if (!follow) {
|
|
|
+ int off = sc.offset - s->trim_lines * line_h;
|
|
|
+
|
|
|
+ sc.offset = off > 0 ? off : 0;
|
|
|
+ }
|
|
|
+ s->trim_lines = 0;
|
|
|
+ }
|
|
|
ngui_scroll_begin(&ui, body, &sc);
|
|
|
ngui_scroll_wheel(&ui, body, &sc);
|
|
|
|
|
|
@@ -180,21 +370,21 @@ static void draw(void)
|
|
|
pending_tail = 0;
|
|
|
follow = sc.offset >= max - 1;
|
|
|
|
|
|
- while (pos < text_len) {
|
|
|
+ while (pos < s->len) {
|
|
|
unsigned int start = pos, end;
|
|
|
|
|
|
- while (pos < text_len && text[pos] != '\n')
|
|
|
+ while (pos < s->len && s->text[pos] != '\n')
|
|
|
pos++;
|
|
|
end = pos;
|
|
|
y = body.y + (int)idx * line_h - sc.offset;
|
|
|
if (y + line_h > body.y && y < body.y + body.h) {
|
|
|
- ngui_text_px(&ui, body.x + 2, y + 1, text + start,
|
|
|
- end - start, line_color(text + start,
|
|
|
- end - start),
|
|
|
+ ngui_text_px(&ui, body.x + 2, y + 1, s->text + start,
|
|
|
+ end - start,
|
|
|
+ line_color(s->text + start, end - start),
|
|
|
LINE_PX, 0, 0, 1);
|
|
|
}
|
|
|
idx++;
|
|
|
- if (pos < text_len && text[pos] == '\n')
|
|
|
+ if (pos < s->len && s->text[pos] == '\n')
|
|
|
pos++;
|
|
|
}
|
|
|
ngui_scroll_end(&ui, body, &sc);
|
|
|
@@ -218,6 +408,10 @@ static void scroll_keys(void)
|
|
|
|
|
|
if (k == NGUI_KEY_ESC)
|
|
|
quit = 1;
|
|
|
+ else if (k >= '1' && k <= '3')
|
|
|
+ select_tab(k - '1');
|
|
|
+ else if (k == NGUI_KEY_TAB)
|
|
|
+ select_tab((cur + 1) % TAB_COUNT);
|
|
|
else if (k == NGUI_KEY_PAGE_UP)
|
|
|
ngui_scroll_to(&sc, sc.offset - page);
|
|
|
else if (k == NGUI_KEY_PAGE_DOWN)
|
|
|
@@ -264,11 +458,24 @@ void _start(const char *arg)
|
|
|
|
|
|
for (;;) {
|
|
|
unsigned int now = u_ticks_ms();
|
|
|
+ int changed = 0;
|
|
|
+ int active_changed = 0;
|
|
|
+ int i;
|
|
|
|
|
|
if ((int)(now - (last_poll + POLL_MS)) >= 0) {
|
|
|
last_poll = now;
|
|
|
- if (pull()) {
|
|
|
- pending_tail = 1;
|
|
|
+ for (i = 0; i < TAB_COUNT; i++) {
|
|
|
+ if (!pull(&src[i]))
|
|
|
+ continue;
|
|
|
+ changed = 1;
|
|
|
+ if (i == cur)
|
|
|
+ active_changed = 1;
|
|
|
+ else
|
|
|
+ src[i].fresh = 1;
|
|
|
+ }
|
|
|
+ if (changed) {
|
|
|
+ if (active_changed)
|
|
|
+ pending_tail = 1;
|
|
|
ngui_invalidate(&ui);
|
|
|
}
|
|
|
}
|
|
|
@@ -277,6 +484,7 @@ void _start(const char *arg)
|
|
|
u_sleep_ms(POLL_MS);
|
|
|
continue;
|
|
|
}
|
|
|
+ tab_input();
|
|
|
scroll_keys();
|
|
|
if (quit)
|
|
|
break;
|