From 63a921ff7befd368bfa9d1149eb8bc02ffb5f248 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 23 Jun 2023 16:47:13 +0530 Subject: [PATCH] Dont show window size on creation --- kitty/child-monitor.c | 2 +- kitty/state.c | 1 + kitty/state.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/kitty/child-monitor.c b/kitty/child-monitor.c index 9f3821a3c..aca066ff6 100644 --- a/kitty/child-monitor.c +++ b/kitty/child-monitor.c @@ -765,7 +765,7 @@ render_os_window(OSWindow *os_window, unsigned int active_window_id, color_type w->cursor_visible_at_last_render = WD.screen->cursor_render_info.is_visible; w->last_cursor_x = WD.screen->cursor_render_info.x; w->last_cursor_y = WD.screen->cursor_render_info.y; w->last_cursor_shape = WD.screen->cursor_render_info.shape; } } - if (os_window->live_resize.in_progress) draw_resizing_text(os_window); + if (os_window->live_resize.in_progress && (monotonic() - os_window->created_at > ms_to_monotonic_t(1000))) draw_resizing_text(os_window); swap_window_buffers(os_window); os_window->last_active_tab = os_window->active_tab; os_window->last_num_tabs = os_window->num_tabs; os_window->last_active_window_id = active_window_id; os_window->focused_at_last_render = os_window->is_focused; diff --git a/kitty/state.c b/kitty/state.c index c8ad740d7..92cd35ce8 100644 --- a/kitty/state.c +++ b/kitty/state.c @@ -204,6 +204,7 @@ add_os_window(void) { ans->id = ++global_state.os_window_id_counter; ans->tab_bar_render_data.vao_idx = create_cell_vao(); ans->background_opacity = OPT(background_opacity); + ans->created_at = monotonic(); bool wants_bg = OPT(background_image) && OPT(background_image)[0] != 0; if (wants_bg) { diff --git a/kitty/state.h b/kitty/state.h index 1e87f1e2e..1d5c00431 100644 --- a/kitty/state.h +++ b/kitty/state.h @@ -189,6 +189,7 @@ typedef struct { typedef struct { void *handle; id_type id; + monotonic_t created_at; struct { int x, y, w, h; bool is_set, was_maximized;