fix: music app improvements, desktop performance improvements
This commit is contained in:
@@ -145,6 +145,7 @@ static void klog_on_poll(Window* win) {
|
||||
|
||||
klog->last_len = n;
|
||||
if (n > 0) klog->last_tail_byte = klog->klog_buf[n - 1];
|
||||
win->dirty = true;
|
||||
}
|
||||
|
||||
static void klog_on_close(Window* win) {
|
||||
|
||||
@@ -54,6 +54,8 @@ static void procmgr_on_poll(Window* win) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
win->dirty = true;
|
||||
}
|
||||
|
||||
static void procmgr_on_draw(Window* win, Framebuffer& fb) {
|
||||
|
||||
@@ -311,12 +311,17 @@ static void terminal_on_poll(Window* win) {
|
||||
if (!terminal_poll(tts->tabs[i])) {
|
||||
// This tab's shell exited
|
||||
term_close_tab(tts, win, i);
|
||||
win->dirty = true;
|
||||
// term_close_tab may have closed the window (last tab).
|
||||
// desktop_close_window calls on_close which nulls app_data
|
||||
// before the window slot is recycled, so win is still valid here.
|
||||
if (!win->app_data) return;
|
||||
}
|
||||
}
|
||||
|
||||
if (tts->tab_count > 0 && tts->tabs[tts->active_tab]->dirty) {
|
||||
win->dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
|
||||
@@ -173,4 +173,4 @@ void open_reboot_dialog(DesktopState* ds);
|
||||
void open_wordprocessor(DesktopState* ds);
|
||||
void open_shutdown_dialog(DesktopState* ds);
|
||||
void open_sleep_dialog(DesktopState* ds);
|
||||
void desktop_poll_external_windows(DesktopState* ds);
|
||||
bool desktop_poll_external_windows(DesktopState* ds);
|
||||
|
||||
Reference in New Issue
Block a user